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

remove quoting in compare server default #1178

Closed
zzzeek opened this issue Feb 14, 2023 · 2 comments
Closed

remove quoting in compare server default #1178

zzzeek opened this issue Feb 14, 2023 · 2 comments
Labels
autogenerate - defaults bug Something isn't working
Milestone

Comments

@zzzeek
Copy link
Member

zzzeek commented Feb 14, 2023

will be updated by #1177, but the logic we want to remove is:

if metadata_col.type._type_affinity is sqltypes.String:
metadata_default = re.sub(r"^'|'$", "", metadata_default)
return f"'{metadata_default}'"

that logic should be within dialects only on an as-needed basis.

we can't remove it on a point release since the converted string is passed to user defined server default comparison

@zzzeek zzzeek added bug Something isn't working autogenerate - defaults labels Feb 14, 2023
@zzzeek zzzeek added this to the 1.10 milestone Feb 14, 2023
@zzzeek zzzeek modified the milestones: 1.10, 1.11 Mar 6, 2023
@zzzeek
Copy link
Member Author

zzzeek commented Mar 6, 2023

welp we missed it. will try for 1.11

@CaselIT CaselIT changed the title remove quoting in compare server default for 1.10 remove quoting in compare server default May 11, 2023
@sqla-tester
Copy link
Collaborator

Federico Caselli has proposed a fix for this issue in the main branch:

Removed server default quoting from compare https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autogenerate - defaults bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants