-
-
Notifications
You must be signed in to change notification settings - Fork 988
fix(clickhouse): ClickHouse migrations fail with "goose: duplicate version 14" when two 014_*.sql files exist #2982
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
base: main
Are you sure you want to change the base?
Conversation
|
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devin Review found 1 new potential issue.
🔴 1 issue in files not directly in the diff
🔴 Renaming migration to 015 creates duplicate version 015 (same goose panic) (internal-packages/clickhouse/schema/015_update_output_error_text_to_extract_data.sql:1)
The PR renames 014_update_output_error_text_to_extract_data.sql to 015_update_output_error_text_to_extract_data.sql to fix a duplicate version 014 issue. However, after merging with main, the schema directory already contains 015_add_task_runs_v2_search_indexes.sql.
Click to expand
Current state after merge
The schema directory now contains two files with version 015:
015_add_task_runs_v2_search_indexes.sql(from main)015_update_output_error_text_to_extract_data.sql(renamed by this PR)
Expected behavior
Each migration file should have a unique version number. The renamed file should be 016_update_output_error_text_to_extract_data.sql instead.
Impact
This will cause the exact same goose panic error that the PR was trying to fix, just with a different version number:
panic: goose: duplicate version 15 detected:
/triggerdotdev/internal-packages/clickhouse/schema/015_update_output_error_text_to_extract_data.sql
/triggerdotdev/internal-packages/clickhouse/schema/015_add_task_runs_v2_search_indexes.sql
ClickHouse migrations will fail to run, blocking database schema updates.
View issue and 4 additional flags in Devin Review.
Fix duplicate ClickHouse migration version 014 (goose panic):