Skip to content

Commit a585f84

Browse files
committed
Support altering primary key columns
Closes #888
1 parent aa744fd commit a585f84

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/migrations/op_common_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type TestCase struct {
3030
wantStartErr error
3131
wantRollbackErr error
3232
wantCompleteErr error
33+
beforeStart func(t *testing.T, ctx context.Context, db *sql.DB, schema string)
3334
afterStart func(t *testing.T, db *sql.DB, schema string)
3435
afterComplete func(t *testing.T, db *sql.DB, schema string)
3536
afterRollback func(t *testing.T, db *sql.DB, schema string)
@@ -52,6 +53,10 @@ func ExecuteTests(t *testing.T, tests TestCases, opts ...roll.Option) {
5253
t.Run(tt.name, func(t *testing.T) {
5354
testutils.WithMigratorInSchemaAndConnectionToContainerWithOptions(t, testSchema, opts, func(mig *roll.Roll, db *sql.DB) {
5455
ctx := context.Background()
56+
if tt.beforeStart != nil {
57+
tt.beforeStart(t, ctx, db, testSchema)
58+
}
59+
5560
config := backfill.NewConfig()
5661

5762
// run all migrations except the last one

0 commit comments

Comments
 (0)