Skip to content

Support alembic column renames #1097

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

Closed
JacobHayes opened this issue Jul 23, 2024 · 0 comments · Fixed by #1141
Closed

Support alembic column renames #1097

JacobHayes opened this issue Jul 23, 2024 · 0 comments · Fixed by #1141
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API.

Comments

@JacobHayes
Copy link
Contributor

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

When renaming a column with alembic, the generated SQL is not valid for BigQuery:

ALTER TABLE `schema`.`table` RENAME `old_name` TO `new_name`

BigQuery expects:

ALTER TABLE `schema`.`table` RENAME COLUMN `old_name` TO `new_name`

Describe the solution you'd like

Override the Alembic ColumnName op to generate the correct syntax.

Describe alternatives you've considered

Define the @compiles(ColumnName, "bigquery") in user code (outside this package)

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API.
Projects
None yet
2 participants