Restyled by pg_format
This commit is contained in:
parent
eff85f1a85
commit
338c359022
24 changed files with 407 additions and 99 deletions
|
@ -27,3 +27,4 @@ CREATE UNIQUE INDEX "User_id_key" ON "User" ("id");
|
|||
-- CreateIndex
|
||||
|
||||
CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember" ("userId", "guildId");
|
||||
|
||||
|
|
|
@ -24,3 +24,4 @@ CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember" ("userId",
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -69,3 +69,4 @@ PRAGMA foreign_keys = ON;
|
|||
-- CreateIndex
|
||||
|
||||
CREATE UNIQUE INDEX "GuildCounter_guildId_channelId_key" ON "GuildCounter" ("guildId", "channelId");
|
||||
|
||||
|
|
|
@ -33,3 +33,4 @@ CREATE UNIQUE INDEX "GuildCounter_guildId_channelId_key" ON "GuildCounter" ("gui
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -41,3 +41,4 @@ CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -43,3 +43,4 @@ CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -28,3 +28,4 @@ CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember" ("userId",
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -11,3 +11,4 @@ CREATE TABLE "Cooldown" (
|
|||
-- CreateIndex
|
||||
|
||||
CREATE UNIQUE INDEX "Cooldown_guildId_userId_timeoutId_key" ON "Cooldown" ("guildId", "userId", "timeoutId");
|
||||
|
||||
|
|
|
@ -153,3 +153,4 @@ CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember" ("userId",
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -53,3 +53,4 @@ CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -10,3 +10,4 @@ ALTER TABLE "Guild"
|
|||
|
||||
ALTER TABLE "Guild"
|
||||
ADD COLUMN "apiCpggUrlIv" TEXT;
|
||||
|
||||
|
|
|
@ -32,3 +32,4 @@ CREATE UNIQUE INDEX "Cooldown_guildId_userId_timeoutId_key" ON "Cooldown" ("guil
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -38,3 +38,4 @@ CREATE UNIQUE INDEX "Cooldown_guildId_userId_timeoutId_key" ON "Cooldown" ("guil
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -68,3 +68,4 @@ CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -72,3 +72,4 @@ CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -77,3 +77,4 @@ CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -87,3 +87,4 @@ CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -89,3 +89,4 @@ CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
|||
PRAGMA foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -13,4 +13,6 @@ CREATE TABLE "GuildShopRoles" (
|
|||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_channelId_key" ON "GuildShopRoles"("guildId", "channelId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_channelId_key" ON "GuildShopRoles" ("guildId", "channelId");
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
Warnings:
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `channelId` on the `GuildShopRoles` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
- You are about to drop the column `channelId` on the `GuildShopRoles` table. All the data in the column will be lost.
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA foreign_keys=OFF;
|
||||
|
||||
PRAGMA foreign_keys = OFF;
|
||||
|
||||
CREATE TABLE "new_GuildShopRoles" (
|
||||
"guildId" TEXT NOT NULL,
|
||||
"roleId" TEXT NOT NULL,
|
||||
|
@ -17,9 +18,26 @@ CREATE TABLE "new_GuildShopRoles" (
|
|||
CONSTRAINT "GuildShopRoles_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildShopRoles_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId") SELECT "createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId" FROM "GuildShopRoles";
|
||||
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId")
|
||||
SELECT
|
||||
"createdAt",
|
||||
"guildId",
|
||||
"lastPayed",
|
||||
"pricePerHour",
|
||||
"roleId",
|
||||
"updatedAt",
|
||||
"userId"
|
||||
FROM
|
||||
"GuildShopRoles";
|
||||
|
||||
DROP TABLE "GuildShopRoles";
|
||||
|
||||
ALTER TABLE "new_GuildShopRoles" RENAME TO "GuildShopRoles";
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles"("guildId", "userId", "roleId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles" ("guildId", "userId", "roleId");
|
||||
|
||||
PRAGMA foreign_key_check;
|
||||
PRAGMA foreign_keys=ON;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
-- RedefineTables
|
||||
PRAGMA foreign_keys=OFF;
|
||||
PRAGMA foreign_keys = OFF;
|
||||
|
||||
CREATE TABLE "new_GuildShopRoles" (
|
||||
"guildId" TEXT NOT NULL,
|
||||
"roleId" TEXT NOT NULL,
|
||||
|
@ -10,11 +11,30 @@ CREATE TABLE "new_GuildShopRoles" (
|
|||
"updatedAt" DATETIME NOT NULL,
|
||||
CONSTRAINT "GuildShopRoles_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildShopRoles_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildShopRoles_guildId_userId_fkey" FOREIGN KEY ("guildId", "userId") REFERENCES "GuildMember" ("guildId", "userId") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
CONSTRAINT "GuildShopRoles_guildId_userId_fkey" FOREIGN KEY ("guildId",
|
||||
"userId") REFERENCES "GuildMember" ("guildId",
|
||||
"userId") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId") SELECT "createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId" FROM "GuildShopRoles";
|
||||
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId")
|
||||
SELECT
|
||||
"createdAt",
|
||||
"guildId",
|
||||
"lastPayed",
|
||||
"pricePerHour",
|
||||
"roleId",
|
||||
"updatedAt",
|
||||
"userId"
|
||||
FROM
|
||||
"GuildShopRoles";
|
||||
|
||||
DROP TABLE "GuildShopRoles";
|
||||
|
||||
ALTER TABLE "new_GuildShopRoles" RENAME TO "GuildShopRoles";
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles"("guildId", "userId", "roleId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles" ("guildId", "userId", "roleId");
|
||||
|
||||
PRAGMA foreign_key_check;
|
||||
PRAGMA foreign_keys=ON;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
-- RedefineTables
|
||||
PRAGMA foreign_keys=OFF;
|
||||
PRAGMA foreign_keys = OFF;
|
||||
|
||||
CREATE TABLE "new_GuildShopRoles" (
|
||||
"guildId" TEXT NOT NULL,
|
||||
"roleId" TEXT NOT NULL,
|
||||
|
@ -10,11 +11,30 @@ CREATE TABLE "new_GuildShopRoles" (
|
|||
"updatedAt" DATETIME NOT NULL,
|
||||
CONSTRAINT "GuildShopRoles_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildShopRoles_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildShopRoles_userId_guildId_fkey" FOREIGN KEY ("userId", "guildId") REFERENCES "GuildMember" ("userId", "guildId") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
CONSTRAINT "GuildShopRoles_userId_guildId_fkey" FOREIGN KEY ("userId",
|
||||
"guildId") REFERENCES "GuildMember" ("userId",
|
||||
"guildId") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId") SELECT "createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId" FROM "GuildShopRoles";
|
||||
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId")
|
||||
SELECT
|
||||
"createdAt",
|
||||
"guildId",
|
||||
"lastPayed",
|
||||
"pricePerHour",
|
||||
"roleId",
|
||||
"updatedAt",
|
||||
"userId"
|
||||
FROM
|
||||
"GuildShopRoles";
|
||||
|
||||
DROP TABLE "GuildShopRoles";
|
||||
|
||||
ALTER TABLE "new_GuildShopRoles" RENAME TO "GuildShopRoles";
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles"("guildId", "userId", "roleId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles" ("guildId", "userId", "roleId");
|
||||
|
||||
PRAGMA foreign_key_check;
|
||||
PRAGMA foreign_keys=ON;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -1,25 +1,26 @@
|
|||
/*
|
||||
Warnings:
|
||||
Warnings:
|
||||
|
||||
- You are about to alter the column `count` on the `GuildCounter` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsEarned` on the `GuildMember` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pointsEarned` on the `GuildMember` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pricePerHour` on the `GuildShopRoles` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `cooldown` on the `Cooldown` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsMinimumLength` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsWorkRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsWorkTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pointsMinimumLength` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pointsRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pointsTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `shopRolesPricePerHour` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `reputationsEarned` on the `User` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
|
||||
*/
|
||||
- You are about to alter the column `count` on the `GuildCounter` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsEarned` on the `GuildMember` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pointsEarned` on the `GuildMember` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pricePerHour` on the `GuildShopRoles` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `cooldown` on the `Cooldown` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsMinimumLength` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsWorkRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `creditsWorkTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pointsMinimumLength` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pointsRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `pointsTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `shopRolesPricePerHour` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
- You are about to alter the column `reputationsEarned` on the `User` table. The data in that column could be lost. The data in that column will be cast from `Int` to `BigInt`.
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA foreign_keys=OFF;
|
||||
|
||||
PRAGMA foreign_keys = OFF;
|
||||
|
||||
CREATE TABLE "new_GuildCounter" (
|
||||
"guildId" TEXT NOT NULL,
|
||||
"channelId" TEXT NOT NULL,
|
||||
|
@ -29,10 +30,24 @@ CREATE TABLE "new_GuildCounter" (
|
|||
"updatedAt" DATETIME NOT NULL,
|
||||
CONSTRAINT "GuildCounter_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_GuildCounter" ("channelId", "count", "createdAt", "guildId", "triggerWord", "updatedAt") SELECT "channelId", "count", "createdAt", "guildId", "triggerWord", "updatedAt" FROM "GuildCounter";
|
||||
|
||||
INSERT INTO "new_GuildCounter" ("channelId", "count", "createdAt", "guildId", "triggerWord", "updatedAt")
|
||||
SELECT
|
||||
"channelId",
|
||||
"count",
|
||||
"createdAt",
|
||||
"guildId",
|
||||
"triggerWord",
|
||||
"updatedAt"
|
||||
FROM
|
||||
"GuildCounter";
|
||||
|
||||
DROP TABLE "GuildCounter";
|
||||
|
||||
ALTER TABLE "new_GuildCounter" RENAME TO "GuildCounter";
|
||||
CREATE UNIQUE INDEX "GuildCounter_guildId_channelId_key" ON "GuildCounter"("guildId", "channelId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildCounter_guildId_channelId_key" ON "GuildCounter" ("guildId", "channelId");
|
||||
|
||||
CREATE TABLE "new_GuildMember" (
|
||||
"userId" TEXT NOT NULL,
|
||||
"guildId" TEXT NOT NULL,
|
||||
|
@ -43,10 +58,24 @@ CREATE TABLE "new_GuildMember" (
|
|||
CONSTRAINT "GuildMember_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildMember_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_GuildMember" ("createdAt", "creditsEarned", "guildId", "pointsEarned", "updatedAt", "userId") SELECT "createdAt", "creditsEarned", "guildId", "pointsEarned", "updatedAt", "userId" FROM "GuildMember";
|
||||
|
||||
INSERT INTO "new_GuildMember" ("createdAt", "creditsEarned", "guildId", "pointsEarned", "updatedAt", "userId")
|
||||
SELECT
|
||||
"createdAt",
|
||||
"creditsEarned",
|
||||
"guildId",
|
||||
"pointsEarned",
|
||||
"updatedAt",
|
||||
"userId"
|
||||
FROM
|
||||
"GuildMember";
|
||||
|
||||
DROP TABLE "GuildMember";
|
||||
|
||||
ALTER TABLE "new_GuildMember" RENAME TO "GuildMember";
|
||||
CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember"("userId", "guildId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember" ("userId", "guildId");
|
||||
|
||||
CREATE TABLE "new_GuildShopRoles" (
|
||||
"guildId" TEXT NOT NULL,
|
||||
"roleId" TEXT NOT NULL,
|
||||
|
@ -57,12 +86,29 @@ CREATE TABLE "new_GuildShopRoles" (
|
|||
"updatedAt" DATETIME NOT NULL,
|
||||
CONSTRAINT "GuildShopRoles_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildShopRoles_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildShopRoles_userId_guildId_fkey" FOREIGN KEY ("userId", "guildId") REFERENCES "GuildMember" ("userId", "guildId") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
CONSTRAINT "GuildShopRoles_userId_guildId_fkey" FOREIGN KEY ("userId",
|
||||
"guildId") REFERENCES "GuildMember" ("userId",
|
||||
"guildId") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId") SELECT "createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId" FROM "GuildShopRoles";
|
||||
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId")
|
||||
SELECT
|
||||
"createdAt",
|
||||
"guildId",
|
||||
"lastPayed",
|
||||
"pricePerHour",
|
||||
"roleId",
|
||||
"updatedAt",
|
||||
"userId"
|
||||
FROM
|
||||
"GuildShopRoles";
|
||||
|
||||
DROP TABLE "GuildShopRoles";
|
||||
|
||||
ALTER TABLE "new_GuildShopRoles" RENAME TO "GuildShopRoles";
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles"("guildId", "userId", "roleId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles" ("guildId", "userId", "roleId");
|
||||
|
||||
CREATE TABLE "new_Cooldown" (
|
||||
"guildId" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
|
@ -73,10 +119,24 @@ CREATE TABLE "new_Cooldown" (
|
|||
CONSTRAINT "Cooldown_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "Cooldown_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_Cooldown" ("cooldown", "createdAt", "guildId", "timeoutId", "updatedAt", "userId") SELECT "cooldown", "createdAt", "guildId", "timeoutId", "updatedAt", "userId" FROM "Cooldown";
|
||||
|
||||
INSERT INTO "new_Cooldown" ("cooldown", "createdAt", "guildId", "timeoutId", "updatedAt", "userId")
|
||||
SELECT
|
||||
"cooldown",
|
||||
"createdAt",
|
||||
"guildId",
|
||||
"timeoutId",
|
||||
"updatedAt",
|
||||
"userId"
|
||||
FROM
|
||||
"Cooldown";
|
||||
|
||||
DROP TABLE "Cooldown";
|
||||
|
||||
ALTER TABLE "new_Cooldown" RENAME TO "Cooldown";
|
||||
CREATE UNIQUE INDEX "Cooldown_guildId_userId_timeoutId_key" ON "Cooldown"("guildId", "userId", "timeoutId");
|
||||
|
||||
CREATE UNIQUE INDEX "Cooldown_guildId_userId_timeoutId_key" ON "Cooldown" ("guildId", "userId", "timeoutId");
|
||||
|
||||
CREATE TABLE "new_Guild" (
|
||||
"id" TEXT NOT NULL,
|
||||
"embedColorSuccess" TEXT NOT NULL DEFAULT '#22bb33',
|
||||
|
@ -84,27 +144,27 @@ CREATE TABLE "new_Guild" (
|
|||
"embedColorError" TEXT NOT NULL DEFAULT '#bb2124',
|
||||
"embedFooterText" TEXT NOT NULL DEFAULT 'https://github.com/ZynerOrg/xyter',
|
||||
"embedFooterIcon" TEXT NOT NULL DEFAULT 'https://github.com/ZynerOrg.png',
|
||||
"creditsEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"creditsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"creditsRate" BIGINT NOT NULL DEFAULT 1,
|
||||
"creditsTimeout" BIGINT NOT NULL DEFAULT 5,
|
||||
"creditsWorkRate" BIGINT NOT NULL DEFAULT 25,
|
||||
"creditsWorkTimeout" BIGINT NOT NULL DEFAULT 86400,
|
||||
"creditsMinimumLength" BIGINT NOT NULL DEFAULT 5,
|
||||
"pointsEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"pointsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"pointsRate" BIGINT NOT NULL DEFAULT 1,
|
||||
"pointsTimeout" BIGINT NOT NULL DEFAULT 5,
|
||||
"pointsMinimumLength" BIGINT NOT NULL DEFAULT 5,
|
||||
"reputationsEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"countersEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"reputationsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"countersEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"apiCpggUrlIv" TEXT,
|
||||
"apiCpggUrlContent" TEXT,
|
||||
"apiCpggTokenIv" TEXT,
|
||||
"apiCpggTokenContent" TEXT,
|
||||
"auditsEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"auditsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"auditsChannelId" TEXT,
|
||||
"shopRolesEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"shopRolesEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"shopRolesPricePerHour" BIGINT NOT NULL DEFAULT 5,
|
||||
"welcomeEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"welcomeEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"welcomeJoinChannelId" TEXT,
|
||||
"welcomeJoinChannelMessage" TEXT,
|
||||
"welcomeLeaveChannelId" TEXT,
|
||||
|
@ -112,19 +172,74 @@ CREATE TABLE "new_Guild" (
|
|||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL
|
||||
);
|
||||
INSERT INTO "new_Guild" ("apiCpggTokenContent", "apiCpggTokenIv", "apiCpggUrlContent", "apiCpggUrlIv", "auditsChannelId", "auditsEnabled", "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "embedColorError", "embedColorSuccess", "embedColorWait", "embedFooterIcon", "embedFooterText", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "shopRolesEnabled", "shopRolesPricePerHour", "updatedAt", "welcomeEnabled", "welcomeJoinChannelId", "welcomeJoinChannelMessage", "welcomeLeaveChannelId", "welcomeLeaveChannelMessage") SELECT "apiCpggTokenContent", "apiCpggTokenIv", "apiCpggUrlContent", "apiCpggUrlIv", "auditsChannelId", "auditsEnabled", "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "embedColorError", "embedColorSuccess", "embedColorWait", "embedFooterIcon", "embedFooterText", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "shopRolesEnabled", "shopRolesPricePerHour", "updatedAt", "welcomeEnabled", "welcomeJoinChannelId", "welcomeJoinChannelMessage", "welcomeLeaveChannelId", "welcomeLeaveChannelMessage" FROM "Guild";
|
||||
|
||||
INSERT INTO "new_Guild" ("apiCpggTokenContent", "apiCpggTokenIv", "apiCpggUrlContent", "apiCpggUrlIv", "auditsChannelId", "auditsEnabled", "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "embedColorError", "embedColorSuccess", "embedColorWait", "embedFooterIcon", "embedFooterText", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "shopRolesEnabled", "shopRolesPricePerHour", "updatedAt", "welcomeEnabled", "welcomeJoinChannelId", "welcomeJoinChannelMessage", "welcomeLeaveChannelId", "welcomeLeaveChannelMessage")
|
||||
SELECT
|
||||
"apiCpggTokenContent",
|
||||
"apiCpggTokenIv",
|
||||
"apiCpggUrlContent",
|
||||
"apiCpggUrlIv",
|
||||
"auditsChannelId",
|
||||
"auditsEnabled",
|
||||
"countersEnabled",
|
||||
"createdAt",
|
||||
"creditsEnabled",
|
||||
"creditsMinimumLength",
|
||||
"creditsRate",
|
||||
"creditsTimeout",
|
||||
"creditsWorkRate",
|
||||
"creditsWorkTimeout",
|
||||
"embedColorError",
|
||||
"embedColorSuccess",
|
||||
"embedColorWait",
|
||||
"embedFooterIcon",
|
||||
"embedFooterText",
|
||||
"id",
|
||||
"pointsEnabled",
|
||||
"pointsMinimumLength",
|
||||
"pointsRate",
|
||||
"pointsTimeout",
|
||||
"reputationsEnabled",
|
||||
"shopRolesEnabled",
|
||||
"shopRolesPricePerHour",
|
||||
"updatedAt",
|
||||
"welcomeEnabled",
|
||||
"welcomeJoinChannelId",
|
||||
"welcomeJoinChannelMessage",
|
||||
"welcomeLeaveChannelId",
|
||||
"welcomeLeaveChannelMessage"
|
||||
FROM
|
||||
"Guild";
|
||||
|
||||
DROP TABLE "Guild";
|
||||
|
||||
ALTER TABLE "new_Guild" RENAME TO "Guild";
|
||||
CREATE UNIQUE INDEX "Guild_id_key" ON "Guild"("id");
|
||||
|
||||
CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
||||
|
||||
CREATE TABLE "new_User" (
|
||||
"id" TEXT NOT NULL,
|
||||
"reputationsEarned" BIGINT NOT NULL DEFAULT 0,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL
|
||||
);
|
||||
INSERT INTO "new_User" ("createdAt", "id", "reputationsEarned", "updatedAt") SELECT "createdAt", "id", "reputationsEarned", "updatedAt" FROM "User";
|
||||
|
||||
INSERT INTO "new_User" ("createdAt", "id", "reputationsEarned", "updatedAt")
|
||||
SELECT
|
||||
"createdAt",
|
||||
"id",
|
||||
"reputationsEarned",
|
||||
"updatedAt"
|
||||
FROM
|
||||
"User";
|
||||
|
||||
DROP TABLE "User";
|
||||
|
||||
ALTER TABLE "new_User" RENAME TO "User";
|
||||
CREATE UNIQUE INDEX "User_id_key" ON "User"("id");
|
||||
|
||||
CREATE UNIQUE INDEX "User_id_key" ON "User" ("id");
|
||||
|
||||
PRAGMA foreign_key_check;
|
||||
PRAGMA foreign_keys=ON;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
|
@ -1,35 +1,48 @@
|
|||
/*
|
||||
Warnings:
|
||||
Warnings:
|
||||
|
||||
- You are about to alter the column `reputationsEarned` on the `User` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `count` on the `GuildCounter` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsEarned` on the `GuildMember` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pointsEarned` on the `GuildMember` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pricePerHour` on the `GuildShopRoles` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsMinimumLength` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsWorkRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsWorkTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pointsMinimumLength` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pointsRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pointsTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `shopRolesPricePerHour` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `cooldown` on the `Cooldown` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
|
||||
*/
|
||||
- You are about to alter the column `reputationsEarned` on the `User` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `count` on the `GuildCounter` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsEarned` on the `GuildMember` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pointsEarned` on the `GuildMember` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pricePerHour` on the `GuildShopRoles` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsMinimumLength` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsWorkRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `creditsWorkTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pointsMinimumLength` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pointsRate` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `pointsTimeout` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `shopRolesPricePerHour` on the `Guild` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `cooldown` on the `Cooldown` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA foreign_keys=OFF;
|
||||
|
||||
PRAGMA foreign_keys = OFF;
|
||||
|
||||
CREATE TABLE "new_User" (
|
||||
"id" TEXT NOT NULL,
|
||||
"reputationsEarned" INTEGER NOT NULL DEFAULT 0,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL
|
||||
);
|
||||
INSERT INTO "new_User" ("createdAt", "id", "reputationsEarned", "updatedAt") SELECT "createdAt", "id", "reputationsEarned", "updatedAt" FROM "User";
|
||||
|
||||
INSERT INTO "new_User" ("createdAt", "id", "reputationsEarned", "updatedAt")
|
||||
SELECT
|
||||
"createdAt",
|
||||
"id",
|
||||
"reputationsEarned",
|
||||
"updatedAt"
|
||||
FROM
|
||||
"User";
|
||||
|
||||
DROP TABLE "User";
|
||||
|
||||
ALTER TABLE "new_User" RENAME TO "User";
|
||||
CREATE UNIQUE INDEX "User_id_key" ON "User"("id");
|
||||
|
||||
CREATE UNIQUE INDEX "User_id_key" ON "User" ("id");
|
||||
|
||||
CREATE TABLE "new_GuildCounter" (
|
||||
"guildId" TEXT NOT NULL,
|
||||
"channelId" TEXT NOT NULL,
|
||||
|
@ -39,10 +52,24 @@ CREATE TABLE "new_GuildCounter" (
|
|||
"updatedAt" DATETIME NOT NULL,
|
||||
CONSTRAINT "GuildCounter_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_GuildCounter" ("channelId", "count", "createdAt", "guildId", "triggerWord", "updatedAt") SELECT "channelId", "count", "createdAt", "guildId", "triggerWord", "updatedAt" FROM "GuildCounter";
|
||||
|
||||
INSERT INTO "new_GuildCounter" ("channelId", "count", "createdAt", "guildId", "triggerWord", "updatedAt")
|
||||
SELECT
|
||||
"channelId",
|
||||
"count",
|
||||
"createdAt",
|
||||
"guildId",
|
||||
"triggerWord",
|
||||
"updatedAt"
|
||||
FROM
|
||||
"GuildCounter";
|
||||
|
||||
DROP TABLE "GuildCounter";
|
||||
|
||||
ALTER TABLE "new_GuildCounter" RENAME TO "GuildCounter";
|
||||
CREATE UNIQUE INDEX "GuildCounter_guildId_channelId_key" ON "GuildCounter"("guildId", "channelId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildCounter_guildId_channelId_key" ON "GuildCounter" ("guildId", "channelId");
|
||||
|
||||
CREATE TABLE "new_GuildMember" (
|
||||
"userId" TEXT NOT NULL,
|
||||
"guildId" TEXT NOT NULL,
|
||||
|
@ -53,10 +80,24 @@ CREATE TABLE "new_GuildMember" (
|
|||
CONSTRAINT "GuildMember_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildMember_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_GuildMember" ("createdAt", "creditsEarned", "guildId", "pointsEarned", "updatedAt", "userId") SELECT "createdAt", "creditsEarned", "guildId", "pointsEarned", "updatedAt", "userId" FROM "GuildMember";
|
||||
|
||||
INSERT INTO "new_GuildMember" ("createdAt", "creditsEarned", "guildId", "pointsEarned", "updatedAt", "userId")
|
||||
SELECT
|
||||
"createdAt",
|
||||
"creditsEarned",
|
||||
"guildId",
|
||||
"pointsEarned",
|
||||
"updatedAt",
|
||||
"userId"
|
||||
FROM
|
||||
"GuildMember";
|
||||
|
||||
DROP TABLE "GuildMember";
|
||||
|
||||
ALTER TABLE "new_GuildMember" RENAME TO "GuildMember";
|
||||
CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember"("userId", "guildId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember" ("userId", "guildId");
|
||||
|
||||
CREATE TABLE "new_GuildShopRoles" (
|
||||
"guildId" TEXT NOT NULL,
|
||||
"roleId" TEXT NOT NULL,
|
||||
|
@ -67,12 +108,29 @@ CREATE TABLE "new_GuildShopRoles" (
|
|||
"updatedAt" DATETIME NOT NULL,
|
||||
CONSTRAINT "GuildShopRoles_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildShopRoles_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "GuildShopRoles_userId_guildId_fkey" FOREIGN KEY ("userId", "guildId") REFERENCES "GuildMember" ("userId", "guildId") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
CONSTRAINT "GuildShopRoles_userId_guildId_fkey" FOREIGN KEY ("userId",
|
||||
"guildId") REFERENCES "GuildMember" ("userId",
|
||||
"guildId") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId") SELECT "createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId" FROM "GuildShopRoles";
|
||||
|
||||
INSERT INTO "new_GuildShopRoles" ("createdAt", "guildId", "lastPayed", "pricePerHour", "roleId", "updatedAt", "userId")
|
||||
SELECT
|
||||
"createdAt",
|
||||
"guildId",
|
||||
"lastPayed",
|
||||
"pricePerHour",
|
||||
"roleId",
|
||||
"updatedAt",
|
||||
"userId"
|
||||
FROM
|
||||
"GuildShopRoles";
|
||||
|
||||
DROP TABLE "GuildShopRoles";
|
||||
|
||||
ALTER TABLE "new_GuildShopRoles" RENAME TO "GuildShopRoles";
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles"("guildId", "userId", "roleId");
|
||||
|
||||
CREATE UNIQUE INDEX "GuildShopRoles_guildId_userId_roleId_key" ON "GuildShopRoles" ("guildId", "userId", "roleId");
|
||||
|
||||
CREATE TABLE "new_Guild" (
|
||||
"id" TEXT NOT NULL,
|
||||
"embedColorSuccess" TEXT NOT NULL DEFAULT '#22bb33',
|
||||
|
@ -80,27 +138,27 @@ CREATE TABLE "new_Guild" (
|
|||
"embedColorError" TEXT NOT NULL DEFAULT '#bb2124',
|
||||
"embedFooterText" TEXT NOT NULL DEFAULT 'https://github.com/ZynerOrg/xyter',
|
||||
"embedFooterIcon" TEXT NOT NULL DEFAULT 'https://github.com/ZynerOrg.png',
|
||||
"creditsEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"creditsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"creditsRate" INTEGER NOT NULL DEFAULT 1,
|
||||
"creditsTimeout" INTEGER NOT NULL DEFAULT 5,
|
||||
"creditsWorkRate" INTEGER NOT NULL DEFAULT 25,
|
||||
"creditsWorkTimeout" INTEGER NOT NULL DEFAULT 86400,
|
||||
"creditsMinimumLength" INTEGER NOT NULL DEFAULT 5,
|
||||
"pointsEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"pointsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"pointsRate" INTEGER NOT NULL DEFAULT 1,
|
||||
"pointsTimeout" INTEGER NOT NULL DEFAULT 5,
|
||||
"pointsMinimumLength" INTEGER NOT NULL DEFAULT 5,
|
||||
"reputationsEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"countersEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"reputationsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"countersEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"apiCpggUrlIv" TEXT,
|
||||
"apiCpggUrlContent" TEXT,
|
||||
"apiCpggTokenIv" TEXT,
|
||||
"apiCpggTokenContent" TEXT,
|
||||
"auditsEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"auditsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"auditsChannelId" TEXT,
|
||||
"shopRolesEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"shopRolesEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"shopRolesPricePerHour" INTEGER NOT NULL DEFAULT 5,
|
||||
"welcomeEnabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
"welcomeEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"welcomeJoinChannelId" TEXT,
|
||||
"welcomeJoinChannelMessage" TEXT,
|
||||
"welcomeLeaveChannelId" TEXT,
|
||||
|
@ -108,10 +166,51 @@ CREATE TABLE "new_Guild" (
|
|||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL
|
||||
);
|
||||
INSERT INTO "new_Guild" ("apiCpggTokenContent", "apiCpggTokenIv", "apiCpggUrlContent", "apiCpggUrlIv", "auditsChannelId", "auditsEnabled", "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "embedColorError", "embedColorSuccess", "embedColorWait", "embedFooterIcon", "embedFooterText", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "shopRolesEnabled", "shopRolesPricePerHour", "updatedAt", "welcomeEnabled", "welcomeJoinChannelId", "welcomeJoinChannelMessage", "welcomeLeaveChannelId", "welcomeLeaveChannelMessage") SELECT "apiCpggTokenContent", "apiCpggTokenIv", "apiCpggUrlContent", "apiCpggUrlIv", "auditsChannelId", "auditsEnabled", "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "embedColorError", "embedColorSuccess", "embedColorWait", "embedFooterIcon", "embedFooterText", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "shopRolesEnabled", "shopRolesPricePerHour", "updatedAt", "welcomeEnabled", "welcomeJoinChannelId", "welcomeJoinChannelMessage", "welcomeLeaveChannelId", "welcomeLeaveChannelMessage" FROM "Guild";
|
||||
|
||||
INSERT INTO "new_Guild" ("apiCpggTokenContent", "apiCpggTokenIv", "apiCpggUrlContent", "apiCpggUrlIv", "auditsChannelId", "auditsEnabled", "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "embedColorError", "embedColorSuccess", "embedColorWait", "embedFooterIcon", "embedFooterText", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "shopRolesEnabled", "shopRolesPricePerHour", "updatedAt", "welcomeEnabled", "welcomeJoinChannelId", "welcomeJoinChannelMessage", "welcomeLeaveChannelId", "welcomeLeaveChannelMessage")
|
||||
SELECT
|
||||
"apiCpggTokenContent",
|
||||
"apiCpggTokenIv",
|
||||
"apiCpggUrlContent",
|
||||
"apiCpggUrlIv",
|
||||
"auditsChannelId",
|
||||
"auditsEnabled",
|
||||
"countersEnabled",
|
||||
"createdAt",
|
||||
"creditsEnabled",
|
||||
"creditsMinimumLength",
|
||||
"creditsRate",
|
||||
"creditsTimeout",
|
||||
"creditsWorkRate",
|
||||
"creditsWorkTimeout",
|
||||
"embedColorError",
|
||||
"embedColorSuccess",
|
||||
"embedColorWait",
|
||||
"embedFooterIcon",
|
||||
"embedFooterText",
|
||||
"id",
|
||||
"pointsEnabled",
|
||||
"pointsMinimumLength",
|
||||
"pointsRate",
|
||||
"pointsTimeout",
|
||||
"reputationsEnabled",
|
||||
"shopRolesEnabled",
|
||||
"shopRolesPricePerHour",
|
||||
"updatedAt",
|
||||
"welcomeEnabled",
|
||||
"welcomeJoinChannelId",
|
||||
"welcomeJoinChannelMessage",
|
||||
"welcomeLeaveChannelId",
|
||||
"welcomeLeaveChannelMessage"
|
||||
FROM
|
||||
"Guild";
|
||||
|
||||
DROP TABLE "Guild";
|
||||
|
||||
ALTER TABLE "new_Guild" RENAME TO "Guild";
|
||||
CREATE UNIQUE INDEX "Guild_id_key" ON "Guild"("id");
|
||||
|
||||
CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
|
||||
|
||||
CREATE TABLE "new_Cooldown" (
|
||||
"guildId" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
|
@ -122,9 +221,25 @@ CREATE TABLE "new_Cooldown" (
|
|||
CONSTRAINT "Cooldown_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT "Cooldown_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_Cooldown" ("cooldown", "createdAt", "guildId", "timeoutId", "updatedAt", "userId") SELECT "cooldown", "createdAt", "guildId", "timeoutId", "updatedAt", "userId" FROM "Cooldown";
|
||||
|
||||
INSERT INTO "new_Cooldown" ("cooldown", "createdAt", "guildId", "timeoutId", "updatedAt", "userId")
|
||||
SELECT
|
||||
"cooldown",
|
||||
"createdAt",
|
||||
"guildId",
|
||||
"timeoutId",
|
||||
"updatedAt",
|
||||
"userId"
|
||||
FROM
|
||||
"Cooldown";
|
||||
|
||||
DROP TABLE "Cooldown";
|
||||
|
||||
ALTER TABLE "new_Cooldown" RENAME TO "Cooldown";
|
||||
CREATE UNIQUE INDEX "Cooldown_guildId_userId_timeoutId_key" ON "Cooldown"("guildId", "userId", "timeoutId");
|
||||
|
||||
CREATE UNIQUE INDEX "Cooldown_guildId_userId_timeoutId_key" ON "Cooldown" ("guildId", "userId", "timeoutId");
|
||||
|
||||
PRAGMA foreign_key_check;
|
||||
PRAGMA foreign_keys=ON;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue