Skip to content

Commit 391feac

Browse files
authored
fix(skus): Add indexes for externalID and radomSubscriptionId in orders table (#2974)
* fix(skus): Add indexes for externalID and radomSubscriptionId in orders table * Update CurrentMigrationVersion to 73
1 parent 03b7fb8 commit 391feac

5 files changed

+5
-1
lines changed

libs/datastore/postgres.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var (
4141
}
4242
dbs = map[string]*sqlx.DB{}
4343
// CurrentMigrationVersion holds the default migration version
44-
CurrentMigrationVersion = uint(71)
44+
CurrentMigrationVersion = uint(73)
4545
// MigrationTracks holds the migration version for a given track (eyeshade, promotion, wallet)
4646
MigrationTracks = map[string]uint{
4747
"eyeshade": 20,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP INDEX CONCURRENTLY orders_metadata_external_id_idx;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE INDEX CONCURRENTLY IF NOT EXISTS orders_metadata_external_id_idx ON orders ((metadata->>'externalID')) WHERE metadata->>'externalID' IS NOT NULL;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP INDEX CONCURRENTLY orders_metadata_radom_subscription_id_idx;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE INDEX CONCURRENTLY IF NOT EXISTS orders_metadata_radom_subscription_id_idx ON orders ((metadata->>'radomSubscriptionId')) WHERE metadata->>'radomSubscriptionId' IS NOT NULL;

0 commit comments

Comments
 (0)