Wolodja Wentland wrote:
> I can't drop these constraints as well. Even if i accept that my tables
> are created with primary key definitions the recipe you showed me does
> not work. It fails with:
>
> --- snip ---
> ...
> /sqlalchemy/sql/compiler.pyc in _requires_quotes(self, value)
>    1306     def _requires_quotes(self, value):
>    1307         """Return True if the given identifier requires
> quoting."""
> -> 1308         lc_value = value.lower()
>    1309         return (lc_value in self.reserved_words
>    1310                 or self.illegal_initial_characters.match(value[0])
>
> AttributeError: 'NoneType' object has no attribute 'lower'

that's not a full stack trace but I would gather its looking for the name
of the constraint.  so if you can provide names for your constraints that
would allow the DropConstraint to work.  You'd need to do the same when
using Migrate so the instructions are more or less the same - make a
PrimaryKeyConstraint() with the correct name and issue DropConstraint, or
more simply just issue engine.execute("DROP CONSTRAINT
<constraint_name>").


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