From 470e606360222ec6a6b75d21bc003d1e6520902a Mon Sep 17 00:00:00 2001 From: JaronZ Date: Fri, 1 Apr 2022 18:53:57 +0200 Subject: [PATCH 1/3] feat: move to prisma --- .gitignore | 1 + package.json | 2 ++ yarn.lock | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/.gitignore b/.gitignore index 90c5f542..6305a17c 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,4 @@ dist # Yarn files .yarn/install-state.gz +prisma/migrations diff --git a/package.json b/package.json index 53e8a4fc..d73a9427 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "dependencies": { "@discordjs/builders": "^0.12.0", "@discordjs/opus": "^0.5.3", + "@prisma/client": "^3.11.1", "@sapphire/decorators": "^4.2.3", "@sapphire/framework": "^3.0.0-next.9ed3d98.0", "@sapphire/pieces": "^3.2.0", @@ -51,6 +52,7 @@ "@types/common-tags": "^1.8.1", "@types/node": "^17.0.17", "prettier": "^2.5.1", + "prisma": "^3.11.1", "tsup": "^5.12.1", "typescript": "^4.5.5" } diff --git a/yarn.lock b/yarn.lock index fce6da3f..f2d278e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -151,6 +151,34 @@ __metadata: languageName: node linkType: hard +"@prisma/client@npm:^3.11.1": + version: 3.11.1 + resolution: "@prisma/client@npm:3.11.1" + dependencies: + "@prisma/engines-version": 3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9 + peerDependencies: + prisma: "*" + peerDependenciesMeta: + prisma: + optional: true + checksum: 8750495b80f1fe0e2a70e439b6c8b5912ca04e6ca8baa1bfed0750bdfe130d8e0d29600414471873fce8683a92b74a45a175d68ab662d8a4f877c59430163e4e + languageName: node + linkType: hard + +"@prisma/engines-version@npm:3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9": + version: 3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9 + resolution: "@prisma/engines-version@npm:3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9" + checksum: ae3b4caf41f316b61c6b7b607fd9466ce5d8ff798ecb6877899a5ae65a55a62d02b83d4639dc6f48900bdf79702b08ff441772367809e01762de1fb74fb731c6 + languageName: node + linkType: hard + +"@prisma/engines@npm:3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9": + version: 3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9 + resolution: "@prisma/engines@npm:3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9" + checksum: 87750ba42f2ad359e381818264acebc02d6e8fa61fe878c8e6e9ed2e0c2d13171e5c5e60ac9b380a9df54b6bc1c83750bbc6364ef09d8db7a613127f236a647b + languageName: node + linkType: hard + "@sapphire/async-queue@npm:^1.1.9": version: 1.2.0 resolution: "@sapphire/async-queue@npm:1.2.0" @@ -2358,6 +2386,7 @@ __metadata: dependencies: "@discordjs/builders": ^0.12.0 "@discordjs/opus": ^0.5.3 + "@prisma/client": ^3.11.1 "@sapphire/decorators": ^4.2.3 "@sapphire/framework": ^3.0.0-next.9ed3d98.0 "@sapphire/pieces": ^3.2.0 @@ -2372,6 +2401,7 @@ __metadata: discord.js: ^13.6.0 dotenv: ^16.0.0 prettier: ^2.5.1 + prisma: ^3.11.1 sodium: ^3.0.2 tslib: ^2.3.1 tsup: ^5.12.1 @@ -2495,6 +2525,18 @@ __metadata: languageName: node linkType: hard +"prisma@npm:^3.11.1": + version: 3.11.1 + resolution: "prisma@npm:3.11.1" + dependencies: + "@prisma/engines": 3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9 + bin: + prisma: build/index.js + prisma2: build/index.js + checksum: 0dc24dad3b71ece4b5de69451f90bce20b3d52cd4b17626a725536daef0db07ee2bb08d4e50aa49332bd0b3a19a9e34bd230551bb0c859acea34f1aa508f17bd + languageName: node + linkType: hard + "process-nextick-args@npm:~2.0.0": version: 2.0.1 resolution: "process-nextick-args@npm:2.0.1" From 5bd4d8bf1bbebf364c20f5d13e51b7888d012c9f Mon Sep 17 00:00:00 2001 From: JaronZ Date: Fri, 1 Apr 2022 21:16:06 +0200 Subject: [PATCH 2/3] fix: add prisma directory --- prisma/schema.prisma | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 prisma/schema.prisma diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 00000000..d205f42a --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,11 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} From db57ad267f6c6bd66bdba4549e38e443659c9c2c Mon Sep 17 00:00:00 2001 From: Jaron Date: Fri, 1 Apr 2022 21:41:33 +0200 Subject: [PATCH 3/3] fix: set provider to mysql --- prisma/schema.prisma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index d205f42a..843e738a 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -6,6 +6,6 @@ generator client { } datasource db { - provider = "postgresql" + provider = "mysql" url = env("DATABASE_URL") }