Merge pull request #440 from ZynerOrg/restyled/dev

Restyle Release 2023.01.01
This commit is contained in:
Axel Olausson Holtenäs 2022-10-21 12:22:44 +02:00 committed by GitHub
commit 0d91268374
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 596 additions and 160 deletions

View file

@ -4,21 +4,26 @@ CREATE TABLE "Guild" (
);
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL
);
-- CreateTable
CREATE TABLE "GuildMember" (
"userId" TEXT NOT NULL,
"guildId" TEXT NOT NULL
);
-- CreateIndex
CREATE UNIQUE INDEX "Guild_id_key" ON "Guild"("id");
CREATE UNIQUE INDEX "Guild_id_key" ON "Guild" ("id");
-- CreateIndex
CREATE UNIQUE INDEX "User_id_key" ON "User"("id");
CREATE UNIQUE INDEX "User_id_key" ON "User" ("id");
-- CreateIndex
CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember"("userId", "guildId");
CREATE UNIQUE INDEX "GuildMember_userId_guildId_key" ON "GuildMember" ("userId", "guildId");

View file

@ -1,14 +1,26 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_GuildMember" (
"userId" TEXT NOT NULL,
"guildId" TEXT NOT NULL,
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" ("guildId", "userId") SELECT "guildId", "userId" FROM "GuildMember";
INSERT INTO "new_GuildMember" ("guildId", "userId")
SELECT
"guildId",
"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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,8 +1,12 @@
-- AlterTable
ALTER TABLE "GuildMember" ADD COLUMN "creditsEarned" INTEGER;
ALTER TABLE "GuildMember" ADD COLUMN "pointsEarned" INTEGER;
ALTER TABLE "GuildMember"
ADD COLUMN "creditsEarned" INTEGER;
ALTER TABLE "GuildMember"
ADD COLUMN "pointsEarned" INTEGER;
-- CreateTable
CREATE TABLE "GuildCounter" (
"guildId" TEXT NOT NULL,
"channelId" TEXT NOT NULL,
@ -12,34 +16,56 @@ CREATE TABLE "GuildCounter" (
);
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"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,
"pointsEnabled" BOOLEAN NOT NULL DEFAULT false,
"pointsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
"pointsRate" INTEGER NOT NULL DEFAULT 1,
"pointsTimeout" 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
);
INSERT INTO "new_Guild" ("id") SELECT "id" FROM "Guild";
INSERT INTO "new_Guild" ("id")
SELECT
"id"
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" INTEGER NOT NULL DEFAULT 0
);
INSERT INTO "new_User" ("id") SELECT "id" FROM "User";
INSERT INTO "new_User" ("id")
SELECT
"id"
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;
-- CreateIndex
CREATE UNIQUE INDEX "GuildCounter_guildId_channelId_key" ON "GuildCounter"("guildId", "channelId");
CREATE UNIQUE INDEX "GuildCounter_guildId_channelId_key" ON "GuildCounter" ("guildId", "channelId");

View file

@ -1,13 +1,14 @@
/*
Warnings:
Warnings:
- You are about to drop the column `counter` on the `GuildCounter` table. All the data in the column will be lost.
- You are about to drop the column `word` on the `GuildCounter` table. All the data in the column will be lost.
- Added the required column `triggerWord` to the `GuildCounter` table without a default value. This is not possible if the table is not empty.
*/
- You are about to drop the column `counter` on the `GuildCounter` table. All the data in the column will be lost.
- You are about to drop the column `word` on the `GuildCounter` table. All the data in the column will be lost.
- Added the required column `triggerWord` to the `GuildCounter` table without a default value. This is not possible if the table is not empty.
*/
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_GuildCounter" (
"guildId" TEXT NOT NULL,
"channelId" TEXT NOT NULL,
@ -15,9 +16,20 @@ CREATE TABLE "new_GuildCounter" (
"count" INTEGER NOT NULL DEFAULT 0,
CONSTRAINT "GuildCounter_guildId_fkey" FOREIGN KEY ("guildId") REFERENCES "Guild" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
INSERT INTO "new_GuildCounter" ("channelId", "guildId") SELECT "channelId", "guildId" FROM "GuildCounter";
INSERT INTO "new_GuildCounter" ("channelId", "guildId")
SELECT
"channelId",
"guildId"
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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,22 +1,43 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"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,
"reputationsEnabled" BOOLEAN NOT NULL DEFAULT false,
"countersEnabled" BOOLEAN NOT NULL DEFAULT false
"reputationsEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
"countersEnabled" BOOLEAN NOT NULL DEFAULT FALSE
);
INSERT INTO "new_Guild" ("countersEnabled", "creditsEnabled", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsRate", "pointsTimeout", "reputationsEnabled") SELECT "countersEnabled", "creditsEnabled", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsRate", "pointsTimeout", "reputationsEnabled" FROM "Guild";
INSERT INTO "new_Guild" ("countersEnabled", "creditsEnabled", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsRate", "pointsTimeout", "reputationsEnabled")
SELECT
"countersEnabled",
"creditsEnabled",
"creditsRate",
"creditsTimeout",
"creditsWorkRate",
"creditsWorkTimeout",
"id",
"pointsEnabled",
"pointsRate",
"pointsTimeout",
"reputationsEnabled"
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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,23 +1,45 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"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
);
INSERT INTO "new_Guild" ("countersEnabled", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsRate", "pointsTimeout", "reputationsEnabled") SELECT "countersEnabled", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsRate", "pointsTimeout", "reputationsEnabled" FROM "Guild";
INSERT INTO "new_Guild" ("countersEnabled", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsRate", "pointsTimeout", "reputationsEnabled")
SELECT
"countersEnabled",
"creditsEnabled",
"creditsMinimumLength",
"creditsRate",
"creditsTimeout",
"creditsWorkRate",
"creditsWorkTimeout",
"id",
"pointsEnabled",
"pointsRate",
"pointsTimeout",
"reputationsEnabled"
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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,5 +1,6 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_GuildMember" (
"userId" TEXT NOT NULL,
"guildId" TEXT NOT NULL,
@ -8,9 +9,22 @@ 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" ("creditsEarned", "guildId", "pointsEarned", "userId") SELECT coalesce("creditsEarned", 0) AS "creditsEarned", "guildId", coalesce("pointsEarned", 0) AS "pointsEarned", "userId" FROM "GuildMember";
INSERT INTO "new_GuildMember" ("creditsEarned", "guildId", "pointsEarned", "userId")
SELECT
coalesce("creditsEarned", 0) AS "creditsEarned",
"guildId",
coalesce("pointsEarned", 0) AS "pointsEarned",
"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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -9,4 +9,5 @@ CREATE TABLE "Cooldown" (
);
-- CreateIndex
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");

View file

@ -1,36 +1,58 @@
/*
Warnings:
Warnings:
- Added the required column `updatedAt` to the `Guild` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `Cooldown` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `GuildCounter` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `User` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `GuildMember` table without a default value. This is not possible if the table is not empty.
*/
- Added the required column `updatedAt` to the `Guild` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `Cooldown` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `GuildCounter` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `User` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `GuildMember` table without a default value. This is not possible if the table is not empty.
*/
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"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,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Guild" ("countersEnabled", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled") SELECT "countersEnabled", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled" FROM "Guild";
INSERT INTO "new_Guild" ("countersEnabled", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled")
SELECT
"countersEnabled",
"creditsEnabled",
"creditsMinimumLength",
"creditsRate",
"creditsTimeout",
"creditsWorkRate",
"creditsWorkTimeout",
"id",
"pointsEnabled",
"pointsMinimumLength",
"pointsRate",
"pointsTimeout",
"reputationsEnabled"
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,
@ -41,10 +63,22 @@ 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", "guildId", "timeoutId", "userId") SELECT "cooldown", "guildId", "timeoutId", "userId" FROM "Cooldown";
INSERT INTO "new_Cooldown" ("cooldown", "guildId", "timeoutId", "userId")
SELECT
"cooldown",
"guildId",
"timeoutId",
"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_GuildCounter" (
"guildId" TEXT NOT NULL,
"channelId" TEXT NOT NULL,
@ -54,20 +88,42 @@ 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", "guildId", "triggerWord") SELECT "channelId", "count", "guildId", "triggerWord" FROM "GuildCounter";
INSERT INTO "new_GuildCounter" ("channelId", "count", "guildId", "triggerWord")
SELECT
"channelId",
"count",
"guildId",
"triggerWord"
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_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" ("id", "reputationsEarned") SELECT "id", "reputationsEarned" FROM "User";
INSERT INTO "new_User" ("id", "reputationsEarned")
SELECT
"id",
"reputationsEarned"
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_GuildMember" (
"userId" TEXT NOT NULL,
"guildId" TEXT NOT NULL,
@ -78,9 +134,22 @@ 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" ("creditsEarned", "guildId", "pointsEarned", "userId") SELECT "creditsEarned", "guildId", "pointsEarned", "userId" FROM "GuildMember";
INSERT INTO "new_GuildMember" ("creditsEarned", "guildId", "pointsEarned", "userId")
SELECT
"creditsEarned",
"guildId",
"pointsEarned",
"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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,5 +1,6 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"embedColorSuccess" TEXT NOT NULL DEFAULT '#22bb33',
@ -7,24 +8,48 @@ 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,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Guild" ("countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "updatedAt") SELECT "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "updatedAt" FROM "Guild";
INSERT INTO "new_Guild" ("countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "updatedAt")
SELECT
"countersEnabled",
"createdAt",
"creditsEnabled",
"creditsMinimumLength",
"creditsRate",
"creditsTimeout",
"creditsWorkRate",
"creditsWorkTimeout",
"id",
"pointsEnabled",
"pointsMinimumLength",
"pointsRate",
"pointsTimeout",
"reputationsEnabled",
"updatedAt"
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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,5 +1,12 @@
-- AlterTable
ALTER TABLE "Guild" ADD COLUMN "apiCpggTokenContent" TEXT;
ALTER TABLE "Guild" ADD COLUMN "apiCpggTokenIv" TEXT;
ALTER TABLE "Guild" ADD COLUMN "apiCpggUrlContent" TEXT;
ALTER TABLE "Guild" ADD COLUMN "apiCpggUrlIv" TEXT;
ALTER TABLE "Guild"
ADD COLUMN "apiCpggTokenContent" TEXT;
ALTER TABLE "Guild"
ADD COLUMN "apiCpggTokenIv" TEXT;
ALTER TABLE "Guild"
ADD COLUMN "apiCpggUrlContent" TEXT;
ALTER TABLE "Guild"
ADD COLUMN "apiCpggUrlIv" TEXT;

View file

@ -1,5 +1,6 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Cooldown" (
"guildId" TEXT NOT NULL,
"userId" TEXT NOT NULL,
@ -10,9 +11,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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,11 +1,12 @@
/*
Warnings:
Warnings:
- 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 `String` 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 `String` to `Int`.
*/
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Cooldown" (
"guildId" TEXT NOT NULL,
"userId" TEXT NOT NULL,
@ -16,9 +17,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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,5 +1,6 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"embedColorSuccess" TEXT NOT NULL DEFAULT '#22bb33',
@ -7,30 +8,63 @@ 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,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Guild" ("apiCpggTokenContent", "apiCpggTokenIv", "apiCpggUrlContent", "apiCpggUrlIv", "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "embedColorError", "embedColorSuccess", "embedColorWait", "embedFooterIcon", "embedFooterText", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "updatedAt") SELECT "apiCpggTokenContent", "apiCpggTokenIv", "apiCpggUrlContent", "apiCpggUrlIv", "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "embedColorError", "embedColorSuccess", "embedColorWait", "embedFooterIcon", "embedFooterText", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "updatedAt" FROM "Guild";
INSERT INTO "new_Guild" ("apiCpggTokenContent", "apiCpggTokenIv", "apiCpggUrlContent", "apiCpggUrlIv", "countersEnabled", "createdAt", "creditsEnabled", "creditsMinimumLength", "creditsRate", "creditsTimeout", "creditsWorkRate", "creditsWorkTimeout", "embedColorError", "embedColorSuccess", "embedColorWait", "embedFooterIcon", "embedFooterText", "id", "pointsEnabled", "pointsMinimumLength", "pointsRate", "pointsTimeout", "reputationsEnabled", "updatedAt")
SELECT
"apiCpggTokenContent",
"apiCpggTokenIv",
"apiCpggUrlContent",
"apiCpggUrlIv",
"countersEnabled",
"createdAt",
"creditsEnabled",
"creditsMinimumLength",
"creditsRate",
"creditsTimeout",
"creditsWorkRate",
"creditsWorkTimeout",
"embedColorError",
"embedColorSuccess",
"embedColorWait",
"embedFooterIcon",
"embedFooterText",
"id",
"pointsEnabled",
"pointsMinimumLength",
"pointsRate",
"pointsTimeout",
"reputationsEnabled",
"updatedAt"
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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,5 +1,6 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"embedColorSuccess" TEXT NOT NULL DEFAULT '#22bb33',
@ -7,32 +8,67 @@ 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,
"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", "updatedAt") 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", "updatedAt" 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", "updatedAt")
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",
"updatedAt"
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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,5 +1,6 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"embedColorSuccess" TEXT NOT NULL DEFAULT '#22bb33',
@ -7,35 +8,72 @@ 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,
"welcomejoinChannelMessahe" TEXT,
"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") 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" 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")
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"
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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,11 +1,12 @@
/*
Warnings:
Warnings:
- You are about to drop the column `welcomejoinChannelMessahe` on the `Guild` table. All the data in the column will be lost.
*/
- You are about to drop the column `welcomejoinChannelMessahe` on the `Guild` table. All the data in the column will be lost.
*/
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"embedColorSuccess" TEXT NOT NULL DEFAULT '#22bb33',
@ -13,27 +14,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,
"welcomeJoinChannelMessahe" TEXT,
"welcomeLeaveChannelId" TEXT,
@ -41,9 +42,48 @@ 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") 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" 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")
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"
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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,11 +1,12 @@
/*
Warnings:
Warnings:
- You are about to drop the column `welcomeJoinChannelMessahe` on the `Guild` table. All the data in the column will be lost.
*/
- You are about to drop the column `welcomeJoinChannelMessahe` on the `Guild` table. All the data in the column will be lost.
*/
-- RedefineTables
PRAGMA foreign_keys=OFF;
PRAGMA foreign_keys = OFF;
CREATE TABLE "new_Guild" (
"id" TEXT NOT NULL,
"embedColorSuccess" TEXT NOT NULL DEFAULT '#22bb33',
@ -13,27 +14,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,
@ -41,9 +42,50 @@ 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", "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", "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", "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",
"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");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
PRAGMA foreign_keys = ON;

View file

@ -1,3 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "sqlite"
provider = "sqlite"