Skip to content

Commit 415a501

Browse files
committed
Switch primary key order for ps_updated_rows.
1 parent 1f0b7fc commit 415a501

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/core/src/migrations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ CREATE TABLE ps_updated_rows(
431431
row_type TEXT,
432432
row_id TEXT,
433433
bucket INTEGER NOT NULL,
434-
PRIMARY KEY(row_type, row_id, bucket)) STRICT, WITHOUT ROWID;
434+
PRIMARY KEY(bucket, row_type, row_id)) STRICT, WITHOUT ROWID;
435435
INSERT INTO ps_updated_rows(row_type, row_id, bucket)
436436
SELECT row_type, row_id, 0 FROM ps_updated_rows_old;
437437
INSERT OR IGNORE INTO ps_updated_rows(row_type, row_id, bucket)

dart/test/utils/migration_fixtures.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ const expectedState = <int, String>{
520520
row_type TEXT,
521521
row_id TEXT,
522522
bucket INTEGER NOT NULL,
523-
PRIMARY KEY(row_type, row_id, bucket)) STRICT, WITHOUT ROWID
523+
PRIMARY KEY(bucket, row_type, row_id)) STRICT, WITHOUT ROWID
524524
;CREATE UNIQUE INDEX ps_buckets_name ON ps_buckets (name)
525525
;CREATE INDEX ps_oplog_key ON ps_oplog (bucket, key)
526526
;CREATE INDEX ps_oplog_opid ON ps_oplog (bucket, op_id)

0 commit comments

Comments
 (0)