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

chore(blobstorage): fix blobstorage-down-migrations #16944

Closed
wants to merge 8 commits into from

Conversation

xiaodino
Copy link
Contributor

@xiaodino xiaodino commented May 1, 2024

Getting an error in blobstorage-down-migrations

2024/05/01 06:08:16 goose run: failed to db-down: ERROR 16669_add_blob_hash_index.sql: failed to run SQL migration: failed to execute SQL query "DROP INDEX blob_hash_index on blob_hashes;": Error 1553 (HY000): Cannot drop index 'blob_hash_index': needed in a foreign key constraint
  • Foreign keys in MySQL automatically create an index on the table. So we don't need 16669_add_blob_hash_index.sql
  • No need to create index for the primary key
  • DROP INDEX blob_hash_index in down migration

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.

1 participant