On May 26, 2011, at 4:04 PM, Jan Dittberner wrote:

> the table.append_column() call was the missing piece of information.
> In SQLA 0.6 it was not needed, in SQLA 0.7 it seems to be required.

the Column is guaranteed not at all associated with a Table if you didn't call 
table.append_column(col).   Its a free standing object that's not in a 
meaningful state when used in a SQL schema context.

> The table.create(col) call triggered the
> ANSIColumnGenerator.visit_column(self, column) method and the column
> object passed to the method had a ForeignKey instance with ForeignKey
> objects' constraint properties set to a ForeignKeyConstraint instance
> instead of None (as in SQLA 0.7).

errrr theres nothing I can see in the source that looks anything like that .  
ForeignKey is virtually identical in 0.6 and 0.7.  The .constraint attribute is 
created when the ForeignKey is associated with a parent Table which occurs via 
the Column.     I can't yet figure out a test that would behave differently on 
0.6 vs. 0.7.

> 
> I was able to fix the unit test by adding
> self.table.append_column(col) for SQLA 0.7. I hope that the change in
> http://code.google.com/p/sqlalchemy-migrate/source/detail?r=2426a14c98f556fc63be2d677378255bfd8e4c2f
> is correct and does not only fix the test.

well if this is only the test that relies upon the table + col issue then you 
are probably OK.    

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

Reply via email to