PrimaryKeyConstraint does not support constraint name
Unlike ForeignKeyConstraint, which does support constraint name.
This should also applicable to all type of constraints.
Comments (6)
-
repo owner -
Account Deleted Attached is the patch based on your suggestion.
Unfortunately sqlite database does not support it, should sqlite.py be change to have it own visit_primary_key_constraint?
-
repo owner - changed status to resolved
im not too concerned about sqlite at the moment since the "name" field of a primary key constraint sort of implies youre getting more specific about your schema in the first place...if you wanted to be database agnostic you'd probably leave the "name" off.
patch applied in changeset:1826
-
repo owner - removed milestone
Removing milestone: 0.3.0 (automated comment)
-
repo owner Spelling fixes: "an SQL" -> "a SQL", see
#266→ <<cset 61f9e3761245>>
-
repo owner Spelling fixes: "an SQL" -> "a SQL", see
#266(cherry picked from commit 61f9e3761245a55f8997ec40b6983bb0770fdec4)
→ <<cset ac8874088099>>
- Log in to comment
the constructor supports a name field, it would just need to be added to ansisql.py visit_primary_key_constraint (and possibly reflection, for those db's that give a constraint name for pk):
feel free to submit a patch for this one.