mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 00:02:19 +00:00
fix: skip down migrations in potentially_stale checksum comparison (#8271)
The potentially_stale block iterated over all migrations including .down.sql reversible migrations. Down migrations share the same version as their up counterpart but have a different checksum, causing the DELETE to remove the up migration row on every startup and triggering re-application of the concurrent index migrations. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -284,6 +284,9 @@ pub async fn migrate(
|
||||
20260207000004,
|
||||
];
|
||||
for m in migrator.migrations.iter() {
|
||||
if m.migration_type.is_down_migration() {
|
||||
continue;
|
||||
}
|
||||
if potentially_stale.contains(&m.version) {
|
||||
if let Err(err) =
|
||||
sqlx::query("DELETE FROM _sqlx_migrations WHERE version = $1 AND checksum != $2")
|
||||
|
||||
Reference in New Issue
Block a user