fix(clickhouse): ClickHouse migrations fail with "goose: duplicate version 14" when two 014_*.sql files exist#2982
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 |
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
There was a problem hiding this comment.
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):