diff --git a/pkg/signalmeow/store/upgrades/00-latest.sql b/pkg/signalmeow/store/upgrades/00-latest.sql index 63f4e22e..6c7dc4bb 100644 --- a/pkg/signalmeow/store/upgrades/00-latest.sql +++ b/pkg/signalmeow/store/upgrades/00-latest.sql @@ -1,4 +1,4 @@ --- v0 -> v9: Latest revision +-- v0 -> v8: Latest revision CREATE TABLE signalmeow_device ( aci_uuid TEXT PRIMARY KEY, diff --git a/pkg/signalmeow/store/upgrades/08-resync-schema-449-postgres.sql b/pkg/signalmeow/store/upgrades/08-resync-schema-449.postgres.sql similarity index 93% rename from pkg/signalmeow/store/upgrades/08-resync-schema-449-postgres.sql rename to pkg/signalmeow/store/upgrades/08-resync-schema-449.postgres.sql index 4f7b47eb..95af7759 100644 --- a/pkg/signalmeow/store/upgrades/08-resync-schema-449-postgres.sql +++ b/pkg/signalmeow/store/upgrades/08-resync-schema-449.postgres.sql @@ -1,6 +1,4 @@ --- v7 -> v8: Migration from https://github.com/mautrix/signal/pull/449 to match the new v8 upgrade (Postgres) --- only: postgres - +-- v7 -> v8: Migration from https://github.com/mautrix/signal/pull/449 to match the new v8 upgrade ALTER TABLE signalmeow_contacts DROP COLUMN profile_avatar_hash; ALTER TABLE signalmeow_contacts RENAME COLUMN profile_fetch_ts TO profile_fetched_at; ALTER TABLE signalmeow_contacts ALTER COLUMN profile_fetched_at DROP DEFAULT; diff --git a/pkg/signalmeow/store/upgrades/09-resync-schema-449-sqlite.sql b/pkg/signalmeow/store/upgrades/08-resync-schema-449.sqlite.sql similarity index 74% rename from pkg/signalmeow/store/upgrades/09-resync-schema-449-sqlite.sql rename to pkg/signalmeow/store/upgrades/08-resync-schema-449.sqlite.sql index 38fbfed2..fa09134b 100644 --- a/pkg/signalmeow/store/upgrades/09-resync-schema-449-sqlite.sql +++ b/pkg/signalmeow/store/upgrades/08-resync-schema-449.sqlite.sql @@ -1,13 +1,4 @@ --- v9: Migration from https://github.com/mautrix/signal/pull/449 to match the new v8 upgrade (SQLite) --- transaction: off --- only: sqlite - --- This is separate from v8 so that postgres can run with transaction: on --- (split upgrades by dialect don't currently allow disabling transaction in only one dialect) - -PRAGMA foreign_keys = OFF; -BEGIN; - +-- v7 -> v8: Migration from https://github.com/mautrix/signal/pull/449 to match the new v8 upgrade ALTER TABLE signalmeow_contacts DROP COLUMN profile_avatar_hash; CREATE TABLE signalmeow_contacts_new ( @@ -43,7 +34,3 @@ FROM signalmeow_contacts; DROP TABLE signalmeow_contacts; ALTER TABLE signalmeow_contacts_new RENAME TO signalmeow_contacts; - -PRAGMA foreign_key_check; -COMMIT; -PRAGMA foreign_keys = ON;