aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHazzajenko <[email protected]>2024-11-01 17:47:22 +1100
committerHazzajenko <[email protected]>2024-11-01 17:47:22 +1100
commit84419358651f2c8151fe568596be9f150ce38205 (patch)
tree88e5ba5400efa2697d823130ef544a713d079436
parent27d20a59d8f57011c6eca9652f687c1c58a54050 (diff)
downloadmuse-84419358651f2c8151fe568596be9f150ce38205.tar.xz
muse-84419358651f2c8151fe568596be9f150ce38205.zip
Add migration for prisma db changes
-rw-r--r--migrations/20241031084730_add_turn_down_volume_when_people_speak/migration.sql21
1 files changed, 21 insertions, 0 deletions
diff --git a/migrations/20241031084730_add_turn_down_volume_when_people_speak/migration.sql b/migrations/20241031084730_add_turn_down_volume_when_people_speak/migration.sql
new file mode 100644
index 0000000..07be5d9
--- /dev/null
+++ b/migrations/20241031084730_add_turn_down_volume_when_people_speak/migration.sql
@@ -0,0 +1,21 @@
+-- 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,
+ "queueAddResponseEphemeral" BOOLEAN NOT NULL DEFAULT false,
+ "autoAnnounceNextSong" BOOLEAN NOT NULL DEFAULT false,
+ "defaultVolume" INTEGER NOT NULL DEFAULT 100,
+ "defaultQueuePageSize" INTEGER NOT NULL DEFAULT 10,
+ "turnDownVolumeWhenPeopleSpeak" BOOLEAN NOT NULL DEFAULT false,
+ "turnDownVolumeWhenPeopleSpeakTarget" INTEGER NOT NULL DEFAULT 20,
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ "updatedAt" DATETIME NOT NULL
+);
+INSERT INTO "new_Setting" ("autoAnnounceNextSong", "createdAt", "defaultQueuePageSize", "defaultVolume", "guildId", "leaveIfNoListeners", "playlistLimit", "queueAddResponseEphemeral", "secondsToWaitAfterQueueEmpties", "updatedAt") SELECT "autoAnnounceNextSong", "createdAt", "defaultQueuePageSize", "defaultVolume", "guildId", "leaveIfNoListeners", "playlistLimit", "queueAddResponseEphemeral", "secondsToWaitAfterQueueEmpties", "updatedAt" FROM "Setting";
+DROP TABLE "Setting";
+ALTER TABLE "new_Setting" RENAME TO "Setting";
+PRAGMA foreign_key_check;
+PRAGMA foreign_keys=ON;