On May 31, 2010, at 10:01 PM, Mike Bernson wrote:

> I would like to restore the TINYINT(1) for all tables.
> 
> I am using reflection to get the tables.
> 
> The docs talk about passing in override value for the columns that I to
> want change from the database as parameters to the table object on
> when reflecting. Since I have no idea what columns are TINYINT(1) until
> I reflect the table I would like to then modify the table object
> replace all the TINYINT(1) with BOOLEAN after the table has been reflected.
> 
> I can scan the table looking for in table.c for the column I want to replace.
> 
> When I find 1 can then create Column object for that column copying few items
> like defaults, null and column name. I then want to replace the column object
> in the table with the column object I just created.
> 
> Can I just call append_column (new_column) or is there a better way to handle
> this. (will append_column even work as the column already exists)
> 
> I will then want to use this table to pass to the orm so that I use the orm
> for handling the record.

why don't you just set column.type = Boolean ?     replacing the columns 
themselves isn't strongly supported since if things point to the original 
column you'd be out of luck.

also maybe just say engine.dialect.ischema_names['tinyint'] = BOOLEAN





> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to