diff --git a/backend/env/.env.example b/backend/env/.env.example index 89be877..1d2c836 100644 --- a/backend/env/.env.example +++ b/backend/env/.env.example @@ -1,2 +1,3 @@ +PORT=3000 DATABASE_URL="postgresql://postgres:1234@localhost:5432/wunju?schema=public" -PORT=3000 \ No newline at end of file +DIRECT_URL="postgresql://postgres:1234@localhost:5432/wunju?schema=public" \ No newline at end of file diff --git a/backend/package-lock.json b/backend/package-lock.json index 9dc20f1..d51c58d 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@prisma/client": "^5.21.1", + "@prisma/client": "^6.1.0", "cors": "^2.8.5", "dotenv-cli": "^7.4.2", "express": "^4.21.1", @@ -26,7 +26,7 @@ "@types/node": "^22.8.7", "eslint": "^9.14.0", "pino-pretty": "^11.3.0", - "prisma": "^5.21.1", + "prisma": "^6.1.0", "tsx": "^4.19.2", "typescript": "^5.6.3", "vite-tsconfig-paths": "^5.0.1" @@ -250,6 +250,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -970,12 +971,12 @@ } }, "node_modules/@prisma/client": { - "version": "5.21.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.21.1.tgz", - "integrity": "sha512-3n+GgbAZYjaS/k0M03yQsQfR1APbr411r74foknnsGpmhNKBG49VuUkxIU6jORgvJPChoD4WC4PqoHImN1FP0w==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.1.0.tgz", + "integrity": "sha512-AbQYc5+EJKm1Ydfq3KxwcGiy7wIbm4/QbjCKWWoNROtvy7d6a3gmAGkKjK0iUCzh+rHV8xDhD5Cge8ke/kiy5Q==", "hasInstallScript": true, "engines": { - "node": ">=16.13" + "node": ">=18.18" }, "peerDependencies": { "prisma": "*" @@ -987,48 +988,48 @@ } }, "node_modules/@prisma/debug": { - "version": "5.21.1", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.21.1.tgz", - "integrity": "sha512-uY8SAhcnORhvgtOrNdvWS98Aq/nkQ9QDUxrWAgW8XrCZaI3j2X7zb7Xe6GQSh6xSesKffFbFlkw0c2luHQviZA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.1.0.tgz", + "integrity": "sha512-0himsvcM4DGBTtvXkd2Tggv6sl2JyUYLzEGXXleFY+7Kp6rZeSS3hiTW9mwtUlXrwYbJP6pwlVNB7jYElrjWUg==", "devOptional": true }, "node_modules/@prisma/engines": { - "version": "5.21.1", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.21.1.tgz", - "integrity": "sha512-hGVTldUkIkTwoV8//hmnAAiAchi4oMEKD3aW5H2RrnI50tTdwza7VQbTTAyN3OIHWlK5DVg6xV7X8N/9dtOydA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.1.0.tgz", + "integrity": "sha512-GnYJbCiep3Vyr1P/415ReYrgJUjP79fBNc1wCo7NP6Eia0CzL2Ot9vK7Infczv3oK7JLrCcawOSAxFxNFsAERQ==", "devOptional": true, "hasInstallScript": true, "dependencies": { - "@prisma/debug": "5.21.1", - "@prisma/engines-version": "5.21.1-1.bf0e5e8a04cada8225617067eaa03d041e2bba36", - "@prisma/fetch-engine": "5.21.1", - "@prisma/get-platform": "5.21.1" + "@prisma/debug": "6.1.0", + "@prisma/engines-version": "6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959", + "@prisma/fetch-engine": "6.1.0", + "@prisma/get-platform": "6.1.0" } }, "node_modules/@prisma/engines-version": { - "version": "5.21.1-1.bf0e5e8a04cada8225617067eaa03d041e2bba36", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.21.1-1.bf0e5e8a04cada8225617067eaa03d041e2bba36.tgz", - "integrity": "sha512-qvnEflL0//lh44S/T9NcvTMxfyowNeUxTunPcDfKPjyJNrCNf2F1zQLcUv5UHAruECpX+zz21CzsC7V2xAeM7Q==", + "version": "6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959.tgz", + "integrity": "sha512-PdJqmYM2Fd8K0weOOtQThWylwjsDlTig+8Pcg47/jszMuLL9iLIaygC3cjWJLda69siRW4STlCTMSgOjZzvKPQ==", "devOptional": true }, "node_modules/@prisma/fetch-engine": { - "version": "5.21.1", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.21.1.tgz", - "integrity": "sha512-70S31vgpCGcp9J+mh/wHtLCkVezLUqe/fGWk3J3JWZIN7prdYSlr1C0niaWUyNK2VflLXYi8kMjAmSxUVq6WGQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.1.0.tgz", + "integrity": "sha512-asdFi7TvPlEZ8CzSZ/+Du5wZ27q6OJbRSXh+S8ISZguu+S9KtS/gP7NeXceZyb1Jv1SM1S5YfiCv+STDsG6rrg==", "devOptional": true, "dependencies": { - "@prisma/debug": "5.21.1", - "@prisma/engines-version": "5.21.1-1.bf0e5e8a04cada8225617067eaa03d041e2bba36", - "@prisma/get-platform": "5.21.1" + "@prisma/debug": "6.1.0", + "@prisma/engines-version": "6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959", + "@prisma/get-platform": "6.1.0" } }, "node_modules/@prisma/get-platform": { - "version": "5.21.1", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.21.1.tgz", - "integrity": "sha512-sRxjL3Igst3ct+e8ya/x//cDXmpLbZQ5vfps2N4tWl4VGKQAmym77C/IG/psSMsQKszc8uFC/q1dgmKFLUgXZQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.1.0.tgz", + "integrity": "sha512-ia8bNjboBoHkmKGGaWtqtlgQOhCi7+f85aOkPJKgNwWvYrT6l78KgojLekE8zMhVk0R9lWcifV0Pf8l3/15V0Q==", "devOptional": true, "dependencies": { - "@prisma/debug": "5.21.1" + "@prisma/debug": "6.1.0" } }, "node_modules/@rollup/rollup-android-arm-eabi": { @@ -5580,19 +5581,19 @@ } }, "node_modules/prisma": { - "version": "5.21.1", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.21.1.tgz", - "integrity": "sha512-PB+Iqzld/uQBPaaw2UVIk84kb0ITsLajzsxzsadxxl54eaU5Gyl2/L02ysivHxK89t7YrfQJm+Ggk37uvM70oQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.1.0.tgz", + "integrity": "sha512-aFI3Yi+ApUxkwCJJwyQSwpyzUX7YX3ihzuHNHOyv4GJg3X5tQsmRaJEnZ+ZyfHpMtnyahhmXVfbTZ+lS8ZtfKw==", "devOptional": true, "hasInstallScript": true, "dependencies": { - "@prisma/engines": "5.21.1" + "@prisma/engines": "6.1.0" }, "bin": { "prisma": "build/index.js" }, "engines": { - "node": ">=16.13" + "node": ">=18.18" }, "optionalDependencies": { "fsevents": "2.3.3" diff --git a/backend/package.json b/backend/package.json index bd7026b..f382b99 100644 --- a/backend/package.json +++ b/backend/package.json @@ -19,7 +19,7 @@ "author": "", "license": "ISC", "dependencies": { - "@prisma/client": "^5.21.1", + "@prisma/client": "^6.1.0", "cors": "^2.8.5", "dotenv-cli": "^7.4.2", "express": "^4.21.1", @@ -36,7 +36,7 @@ "@types/node": "^22.8.7", "eslint": "^9.14.0", "pino-pretty": "^11.3.0", - "prisma": "^5.21.1", + "prisma": "^6.1.0", "tsx": "^4.19.2", "typescript": "^5.6.3", "vite-tsconfig-paths": "^5.0.1" diff --git a/backend/src/domain/index.ts b/backend/src/domain/index.ts index 8d1abf3..a62953b 100644 --- a/backend/src/domain/index.ts +++ b/backend/src/domain/index.ts @@ -1,3 +1,3 @@ -export * from './Student'; export * from './Question'; +export * from './Student'; export * from './Subject'; diff --git a/backend/src/infra/orm/prisma/migrations/20241103224559_create_test_entity/migration.sql b/backend/src/infra/orm/prisma/migrations/20241103224559_create_test_entity/migration.sql deleted file mode 100644 index 646fdf2..0000000 --- a/backend/src/infra/orm/prisma/migrations/20241103224559_create_test_entity/migration.sql +++ /dev/null @@ -1,8 +0,0 @@ --- CreateTable -CREATE TABLE "test_entity" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL -); - --- CreateIndex -CREATE UNIQUE INDEX "test_entity_id_key" ON "test_entity"("id"); diff --git a/backend/src/infra/orm/prisma/migrations/migration_lock.toml b/backend/src/infra/orm/prisma/migrations/migration_lock.toml deleted file mode 100644 index fbffa92..0000000 --- a/backend/src/infra/orm/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/backend/src/infra/orm/prisma/schema.prisma b/backend/src/infra/orm/prisma/schema.prisma index 0e33eee..f0e4a53 100644 --- a/backend/src/infra/orm/prisma/schema.prisma +++ b/backend/src/infra/orm/prisma/schema.prisma @@ -1,11 +1,11 @@ datasource db { - provider = "postgresql" - url = env("DATABASE_URL") + provider = "postgresql" + url = env("DATABASE_URL") + directUrl = env("DIRECT_URL") } generator client { provider = "prisma-client-js" - previewFeatures = ["prismaSchemaFolder"] } model TestEntity {