1
0
Fork 0
out-of-your-element-fork-th.../db/migrations/0002-optimise-profile-content.sql

21 lines
391 B
MySQL
Raw Permalink Normal View History

2023-09-30 12:24:05 +00:00
BEGIN TRANSACTION;
2023-09-29 04:41:11 +00:00
-- Change hashed_profile_content column affinity to INTEGER
CREATE TABLE "new_sim_member" (
"mxid" TEXT NOT NULL,
"room_id" TEXT NOT NULL,
"hashed_profile_content" INTEGER,
PRIMARY KEY("room_id","mxid")
) WITHOUT ROWID;
INSERT INTO new_sim_member SELECT * FROM sim_member;
DROP TABLE sim_member;
ALTER TABLE new_sim_member RENAME TO sim_member;
2023-09-30 12:24:05 +00:00
COMMIT;
2023-09-29 04:41:11 +00:00
VACUUM;