TypeError when inspecting a MySQL DB
Thanks for reporting!
 @coleifer, I guess that's more elegant (and solves the problem too):

```
diff --git a/pwiz.py b/pwiz.py
index d20ebf5..5c61d21 100755
--- a/pwiz.py
+++ b/pwiz.py
@@ -308,8 +308,8 @@ def introspect(db, schema=None):
     for table in tables:
         col_meta[table] = {}
         for column, rel_table, rel_pk in table_fks[table]:
-            models[table][column][0] = ForeignKeyField
-            models[rel_table][rel_pk][0] = PrimaryKeyField
+            models[table][column] = (ForeignKeyField, models[table][column][1])
+            models[rel_table][rel_pk] = (PrimaryKeyField, models[rel_table][rel_pk][1])
             if rel_table == table:
                 ttm = "'self'"
             else:
```

I'm getting the following error when executing this command:

```
python pwiz.py -u root --password="<password>" -e mysql elecciones_2013 > ~/schema_elecciones.py
```

The error is:

```
Traceback (most recent call last):
  File "pwiz.py", line 417, in <module>
    print_models(options.engine, database, tables, **connect)
  File "pwiz.py", line 332, in print_models
    models, table_to_model, table_fks, col_meta = introspect(db, schema)
  File "pwiz.py", line 311, in introspect
    models[table][column][0] = ForeignKeyField
TypeError: 'tuple' object does not support item assignment
```

I changed the following line and it worked just fine. Here it is in diff:

```
diff --git i/pwiz.py w/pwiz.py
index d20ebf5..1ff2db7 100755
--- i/pwiz.py
+++ w/pwiz.py
@@ -171,7 +171,7 @@ class MySQLDB(DB):
     def get_columns(self, table):
         curs = self.conn.execute_sql('select * from `%s` limit 1' % table)
         return dict(
-            [r[0], (self.reverse_mapping.get(r[1], UnknownFieldType), r[6])]
+            [r[0], [self.reverse_mapping.get(r[1], UnknownFieldType), r[6]]]
             for r in curs.description)

     def get_foreign_keys(self, table):
```
