why is the constrain name set to None in create_foreign_key #1559
-
I have taken a look at some of the existing issues and discussions, I'm not sure I understand everything but I could not find a definitive answer to this I noticed that if I add a new class with a foreign key contrain, the autogenerated migration adds
and this seems to somehow inform alembic of the autogenerated constrain name Whereas, when a new column with a foreign key contrain is added to an already existing table, the autogenerated script adds
and, when dropping that constrain (either in anothe rupgrade script or i nthe downgrade script), the constrain name is left as
is the re any plan to fix this inconsistency? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
hi - read the doc section at https://alembic.sqlalchemy.org/en/latest/naming.html which explains what has to be done here |
Beta Was this translation helpful? Give feedback.
yah we dont set that by default. SQLAlchemy has never applied names automatically (except for that one index case) so this needs to be set up by the end user