Skip to content

Block registration of 'ultranormalized' names #10498

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

Merged
merged 4 commits into from
Dec 18, 2021

Conversation

di
Copy link
Member

@di di commented Dec 17, 2021

No description provided.

@di di requested a review from ewdurbin December 17, 2021 07:09
@di di force-pushed the block-ultranormalized-names branch from 88e3936 to b390cb9 Compare December 17, 2021 14:49
@ewdurbin ewdurbin merged commit aff8d87 into main Dec 18, 2021
@ewdurbin ewdurbin deleted the block-ultranormalized-names branch December 18, 2021 14:57
@ewdurbin ewdurbin mentioned this pull request Feb 7, 2022
1 task
domdfcoding pushed a commit to domdfcoding/warehouse that referenced this pull request Jun 7, 2022
* Block registration of 'ultranormalized' names

* Create an index over ultranormalize_name

* Update warehouse/migrations/versions/d18d443f89f0_ultranormalize_name_function.py

* update help, differentiate message for ultranormalized collisions

Co-authored-by: Ee Durbin <[email protected]>
miketheman added a commit to miketheman/warehouse that referenced this pull request Jun 23, 2023
In pypi#10498 and index was manually added via migration.
At the time, SQLAlchemy 1.4 did not detect this un-declared change.

Since SQLAlchemy 2.0, autogenerating a migration for the codebase wants
to drop the index, since it's not declared on the table.

Adding the correct column to the `__table_args__` means that the column
name needs to be in scope, which it cannot be at the top of the table
definition, so move it to the bottom, and add the existing Index.

With this change in place, alembic no longer suggests that we delete the
index, nor does it suggest any other operations.

Signed-off-by: Mike Fiedler <[email protected]>
ewdurbin pushed a commit that referenced this pull request Jun 26, 2023
In #10498 and index was manually added via migration.
At the time, SQLAlchemy 1.4 did not detect this un-declared change.

Since SQLAlchemy 2.0, autogenerating a migration for the codebase wants
to drop the index, since it's not declared on the table.

Adding the correct column to the `__table_args__` means that the column
name needs to be in scope, which it cannot be at the top of the table
definition, so move it to the bottom, and add the existing Index.

With this change in place, alembic no longer suggests that we delete the
index, nor does it suggest any other operations.

Signed-off-by: Mike Fiedler <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants