This repository was archived by the owner on Sep 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
internal/database/migration/store Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,12 @@ func (s *Store) EnsureSchemaTable(ctx context.Context) (err error) {
93
93
return nil
94
94
}
95
95
96
+ // backfillOverrides contains a list of migration IDs that are to be backfilled
97
+ // after the stitched-migration graph has already been constructed.
98
+ var backfillOverrides = []int64 {
99
+ 1648115472 , // See https://github.com/sourcegraph/sourcegraph/pull/46969 and https://github.com/sourcegraph/sourcegraph/pull/55650
100
+ }
101
+
96
102
// BackfillSchemaVersions adds "backfilled" rows into the migration_logs table to make instances
97
103
// upgraded from older versions work uniformly with instances booted from a newer version.
98
104
//
@@ -171,7 +177,12 @@ func (s *Store) BackfillSchemaVersions(ctx context.Context) error {
171
177
if err != nil {
172
178
return err
173
179
}
180
+
174
181
idsToBackfill := []int64 {}
182
+ for _ , id := range backfillOverrides {
183
+ idsToBackfill = append (idsToBackfill , int64 (id ))
184
+ }
185
+
175
186
for _ , id := range ancestorIDs {
176
187
idsToBackfill = append (idsToBackfill , int64 (id ))
177
188
}
Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ func testBackfillSchemaVersion(
127
127
}
128
128
129
129
sort .Ints (appliedVersions )
130
+ for _ , version := range backfillOverrides {
131
+ expectedVersions = append (expectedVersions , int (version ))
132
+ }
130
133
sort .Ints (expectedVersions )
131
134
if diff := cmp .Diff (expectedVersions , appliedVersions ); diff != "" {
132
135
t .Errorf ("unexpected applied migrations (-want +got):\n %s" , diff )
You can’t perform that action at this time.
0 commit comments