Skip to content
New issue

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

SQLAlchemy metadata is not acutally added to the extension #586

Open
brassy-endomorph opened this issue Sep 14, 2024 · 0 comments
Open

SQLAlchemy metadata is not acutally added to the extension #586

brassy-endomorph opened this issue Sep 14, 2024 · 0 comments

Comments

@brassy-endomorph
Copy link
Collaborator

brassy-endomorph commented Sep 14, 2024

Is your feature request related to a problem? Please describe.

We create a naming convention for indices, but we don't add it to the SQLAlchemy extension

hushline/hushline/db.py

Lines 4 to 14 in 53c65ee

metadata = MetaData(
naming_convention={
"ix": "ix_%(column_0_label)s",
"uq": "uq_%(table_name)s_%(column_0_name)s",
"ck": "ck_%(table_name)s_%(constraint_name)s",
"fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",
"pk": "pk_%(table_name)s",
}
)
db = SQLAlchemy()

Describe the solution you'd like

  1. Add it
  2. Autogenerate a new migrations so that existing indices pick up the new naming convention
@brassy-endomorph brassy-endomorph changed the title SQLAlchemy metadata is acutally added to the extension SQLAlchemy metadata is not acutally added to the extension Sep 14, 2024
This was referenced Sep 17, 2024
brassy-endomorph added a commit that referenced this issue Sep 20, 2024
brassy-endomorph added a commit that referenced this issue Sep 20, 2024
brassy-endomorph added a commit that referenced this issue Sep 20, 2024
brassy-endomorph added a commit that referenced this issue Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant