fix: Extend migration fixture test with down and fix 000045 (#6130)

This commit is contained in:
Mathias Fredriksson 2023-02-09 16:59:54 +02:00 committed by GitHub
parent 049984ce7f
commit b46d0d693f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,2 +1,2 @@
ALTER TABLE workspace_builds
ADD COLUMN name character varying(64) NOT NULL;
ADD COLUMN name character varying(64) NOT NULL DEFAULT '';

View File

@ -331,6 +331,10 @@ func TestMigrateUpWithFixtures(t *testing.T) {
s.Add(table, count)
}
}
// Test that migration down is successful after up.
err = migrations.Down(db)
require.NoError(t, err, "final migration down should be successful")
})
}
}