aboutsummaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorJohannes Vääräkangas <[email protected]>2022-02-12 04:05:02 +0200
committerGitHub <[email protected]>2022-02-11 20:05:02 -0600
commit4dbb55a72119a61033d2df6e8cf46f5eaa7bba15 (patch)
treec23bfee7a2c18a18ac8536a6b31e0e22eb1d9c6e /migrations
parent8e5b3cfa432abc4b3e2ef76a139da2586ccb1213 (diff)
downloadmuse-4dbb55a72119a61033d2df6e8cf46f5eaa7bba15.tar.xz
muse-4dbb55a72119a61033d2df6e8cf46f5eaa7bba15.zip
Configurable voice channel leave behavior (#514)
Co-authored-by: Max Isom <[email protected]>
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20220212014052_add_seconds_to_wait_after_queue_empties_and_leave_if_no_listeners/migration.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/migrations/20220212014052_add_seconds_to_wait_after_queue_empties_and_leave_if_no_listeners/migration.sql b/migrations/20220212014052_add_seconds_to_wait_after_queue_empties_and_leave_if_no_listeners/migration.sql
new file mode 100644
index 0000000..8079195
--- /dev/null
+++ b/migrations/20220212014052_add_seconds_to_wait_after_queue_empties_and_leave_if_no_listeners/migration.sql
@@ -0,0 +1,16 @@
+-- RedefineTables
+PRAGMA foreign_keys=OFF;
+CREATE TABLE "new_Setting" (
+ "guildId" TEXT NOT NULL PRIMARY KEY,
+ "playlistLimit" INTEGER NOT NULL DEFAULT 50,
+ "secondsToWaitAfterQueueEmpties" INTEGER NOT NULL DEFAULT 30,
+ "leaveIfNoListeners" BOOLEAN NOT NULL DEFAULT true,
+ "roleId" TEXT,
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ "updatedAt" DATETIME NOT NULL
+);
+INSERT INTO "new_Setting" ("createdAt", "guildId", "playlistLimit", "roleId", "updatedAt") SELECT "createdAt", "guildId", "playlistLimit", "roleId", "updatedAt" FROM "Setting";
+DROP TABLE "Setting";
+ALTER TABLE "new_Setting" RENAME TO "Setting";
+PRAGMA foreign_key_check;
+PRAGMA foreign_keys=ON;