We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, the name is {primary_key_table}{column_name}_fk, which is not ideal when you use that some primary key for multiple foreign keys.
With reference to Alembic docs, for foreign key constraint format may be as below,
"fk" - fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s
fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s
For example, Hero Table with id referenced by Team table will be like fk_hero_id_team
fk_hero_id_team
Other constraints if needed "ix" - ix_%(column_0_label)s "uq" - uq_%(table_name)s_%(column_0_name)s "ck" - ck_%(table_name)s_%(constraint_name)s "pk" - pk_%(table_name)s
ix_%(column_0_label)s
uq_%(table_name)s_%(column_0_name)s
ck_%(table_name)s_%(constraint_name)s
pk_%(table_name)s
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently, the name is {primary_key_table}{column_name}_fk, which is not ideal when you use that some primary key for multiple foreign keys.
With reference to Alembic docs, for foreign key constraint format may be as below,
"fk" -
fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s
For example, Hero Table with id referenced by Team table will be like
fk_hero_id_team
Other constraints if needed
"ix" -
ix_%(column_0_label)s
"uq" -
uq_%(table_name)s_%(column_0_name)s
"ck" -
ck_%(table_name)s_%(constraint_name)s
"pk" -
pk_%(table_name)s
The text was updated successfully, but these errors were encountered: