Create guild_active table instead of column

This commit is contained in:
Cadence Ember 2024-09-24 16:31:47 +12:00
parent 06f502dd89
commit dbbb8281e6
6 changed files with 87 additions and 7 deletions

View file

@ -0,0 +1,11 @@
BEGIN TRANSACTION;
CREATE TABLE "guild_active" (
"guild_id" TEXT NOT NULL,
"autocreate" INTEGER NOT NULL,
PRIMARY KEY("guild_id")
) WITHOUT ROWID;
INSERT INTO guild_active (guild_id, autocreate) SELECT guild_id, 1 FROM guild_space;
COMMIT;

View file

@ -1,5 +0,0 @@
BEGIN TRANSACTION;
ALTER TABLE guild_space ADD COLUMN autocreate INTEGER NOT NULL DEFAULT 1;
COMMIT;

View file

@ -31,6 +31,10 @@ export type Models = {
guild_id: string
space_id: string
privacy_level: number
}
guild_active: {
guild_id: string
autocreate: number
}