-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Mogyuchi <[email protected]>
- Loading branch information
1 parent
08760c5
commit 46da125
Showing
14 changed files
with
285 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"eslint.experimental.useFlatConfig": true | ||
"eslint.experimental.useFlatConfig": true, | ||
"[prisma]": { | ||
"editor.defaultFormatter": "Prisma.prisma" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-- CreateTable | ||
CREATE TABLE `connectionStates` ( | ||
`voiceChannel` BIGINT UNSIGNED NOT NULL, | ||
`guild` BIGINT UNSIGNED NOT NULL, | ||
`readChannel` BIGINT UNSIGNED NOT NULL, | ||
`skipUser` TEXT NULL, | ||
|
||
PRIMARY KEY (`voiceChannel` ASC) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- CreateTable | ||
CREATE TABLE `userSetting` ( | ||
`id` BIGINT NOT NULL DEFAULT 0, | ||
`speaker` VARCHAR(20) NOT NULL DEFAULT '', | ||
`pitch` INTEGER UNSIGNED NOT NULL, | ||
`speed` INTEGER UNSIGNED NOT NULL, | ||
`isDontRead` TINYINT NOT NULL DEFAULT 0, | ||
|
||
PRIMARY KEY (`id` ASC) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
18 changes: 18 additions & 0 deletions
18
prisma/migrations/20240722053023_change_to_enum/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
Warnings: | ||
- The primary key for the `userSetting` table will be changed. If it partially fails, the table could be left without primary key constraint. | ||
- You are about to alter the column `id` on the `userSetting` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `UnsignedBigInt`. | ||
- You are about to alter the column `speaker` on the `userSetting` table. The data in that column could be lost. The data in that column will be cast from `VarChar(20)` to `Enum(EnumId(0))`. | ||
- Made the column `skipUser` on table `connectionstates` required. This step will fail if there are existing NULL values in that column. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE `connectionStates` MODIFY `skipUser` TEXT NOT NULL; | ||
|
||
-- AlterTable | ||
ALTER TABLE `userSetting` DROP PRIMARY KEY, | ||
MODIFY `id` BIGINT UNSIGNED NOT NULL, | ||
MODIFY `speaker` ENUM('show', 'haruka', 'hikari', 'takeru', 'santa', 'bear') NOT NULL, | ||
MODIFY `isDontRead` BOOLEAN NOT NULL DEFAULT false, | ||
ADD PRIMARY KEY (`id`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Please do not edit this file manually | ||
# It should be added in your version-control system (i.e. Git) | ||
provider = "mysql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
datasource db { | ||
provider = "mysql" | ||
url = env("DATABASE_URL") | ||
shadowDatabaseUrl = env("SHADOW_DATABASE_URL") | ||
} | ||
|
||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
enum SpeakerList { | ||
show | ||
haruka | ||
hikari | ||
takeru | ||
santa | ||
bear | ||
} | ||
|
||
model connectionStates { | ||
voiceChannel BigInt @id @db.UnsignedBigInt | ||
guild BigInt @db.UnsignedBigInt | ||
readChannel BigInt @db.UnsignedBigInt | ||
skipUser String @db.Text | ||
} | ||
|
||
model userSetting { | ||
id BigInt @id @db.UnsignedBigInt | ||
speaker SpeakerList | ||
pitch Int @db.UnsignedInt | ||
speed Int @db.UnsignedInt | ||
isDontRead Boolean @default(false) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.