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

bugfix: removed double creation of unique index #227

Merged
merged 1 commit into from
Aug 7, 2023
Merged

Conversation

fmazan
Copy link

@fmazan fmazan commented Aug 4, 2023

Changes in this PR

2023-08-04 11:53:51,517 20748 9968 N/A INFO peewee_migrate Migrate "123_add_uuid"
2023-08-04 11:53:51,517 20748 9968 N/A INFO peewee_migrate add_column ('some_table', 'uuid', <SomeField: SomeModel.uuid>)
2023-08-04 11:53:51,517 20748 9968 N/A DEBUG peewee ('ALTER TABLE `some_table` ADD COLUMN `uuid` BINARY(16)', [])
2023-08-04 11:53:51,521 20748 9968 N/A DEBUG peewee ('CREATE UNIQUE INDEX `some_table_uuid` ON `some_table` (`uuid`)', [])
2023-08-04 11:53:51,528 20748 9968 N/A INFO peewee_migrate add_index ('some_table', ('uuid',))
2023-08-04 11:53:51,528 20748 9968 N/A DEBUG peewee ('CREATE UNIQUE INDEX `some_table_uuid` ON `some_table` (`uuid`)', [])
...
pymysql.err.OperationalError: (1061, "Duplicate key name 'some_table_uuid'")

cc/ @klen

@fmazan fmazan requested a review from klen as a code owner August 4, 2023 10:23
@klen
Copy link
Owner

klen commented Aug 7, 2023

@fmazan Thank you!

@klen klen merged commit c24331f into klen:develop Aug 7, 2023
5 of 6 checks passed
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