Create guild_active table instead of column
This commit is contained in:
11
src/db/migrations/0014-add-guild-active.sql
Normal file
11
src/db/migrations/0014-add-guild-active.sql
Normal 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;
|
||||
@@ -1,5 +0,0 @@
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
ALTER TABLE guild_space ADD COLUMN autocreate INTEGER NOT NULL DEFAULT 1;
|
||||
|
||||
COMMIT;
|
||||
4
src/db/orm-defs.d.ts
vendored
4
src/db/orm-defs.d.ts
vendored
@@ -31,6 +31,10 @@ export type Models = {
|
||||
guild_id: string
|
||||
space_id: string
|
||||
privacy_level: number
|
||||
}
|
||||
|
||||
guild_active: {
|
||||
guild_id: string
|
||||
autocreate: number
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user