Hi everybody,
yesterday I was try to copy a table via SA when I noticed a strange
behaviour that I think is a bug.

Here it is a summary of my issue: what I'm trying to do is to copy a
list of tables from one schema to another (my backend is Postgresql,
but it only marginally matters), and from the docs seems that
table_obj.tometadata(meta, schema='new_schema') is the way to go.

However running my code I got an unexpected error complaining about
some unneeded constraints. It turned out one of my tables has a
boolean column, and when copying it the CheckConstraint() on it is
passed down to the DLL even if Postgresql supports boolean type
natively.

Reading the SA source code for .tometadata() method I noticed that it
calls the CheckConstraint.copy() method and the latter doesn't respect
self._create_rule attribute when returning a copy of the constraint
itself. I think this is a bug, but maybe I'm wrong. I've also searched
the bug reports but without success. Can anyone conferm this? As a
temporary fix is there any other way to copy tables from one schema to
another?

Thanks,
Andrea

-- 
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