From 7cd920911048eda0cd2f02a13a8076a9459c9894 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 20 May 2022 19:31:50 +0200 Subject: [PATCH] Use local db --- .env | 2 +- package.json | 1 + prisma/schema.prisma | 2 +- yarn.lock | 12 ++++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.env b/.env index bb2ad23..03cdc55 100644 --- a/.env +++ b/.env @@ -4,4 +4,4 @@ # Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB (Preview). # See the documentation for all the connection string options: https://pris.ly/d/connection-strings -DATABASE_URL="mysql://25socxdw3fbr:pscale_pw_SbgQFHnjcTtgijldeQwKoDdf7LICzm9qAzs2AGJ4W-8@gwzak9auhlla.eu-central-2.psdb.cloud/festa?sslaccept=strict" \ No newline at end of file +DATABASE_URL="postgresql://steffo@localhost/festa?host=/var/run/postgresql" \ No newline at end of file diff --git a/package.json b/package.json index 7102d1f..e2ba8cc 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@prisma/client": "3.14.0", "next": "12.1.6", "prisma": "^3.14.0", "react": "18.1.0", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 02d0127..e18b8c4 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -6,7 +6,7 @@ generator client { } datasource db { - provider = "mysql" + provider = "postgresql" url = env("DATABASE_URL") } diff --git a/yarn.lock b/yarn.lock index efc0dc0..75a8dae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -139,6 +139,18 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@prisma/client@3.14.0": + version "3.14.0" + resolved "https://registry.npmjs.org/@prisma/client/-/client-3.14.0.tgz#bb90405c012fcca11f4647d91153ed4c58f3bd48" + integrity sha512-atb41UpgTR1MCst0VIbiHTMw8lmXnwUvE1KyUCAkq08+wJyjRE78Due+nSf+7uwqQn+fBFYVmoojtinhlLOSaA== + dependencies: + "@prisma/engines-version" "3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a" + +"@prisma/engines-version@3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a": + version "3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a" + resolved "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a.tgz#4edae57cf6527f35e22cebe75e49214fc0e99ac9" + integrity sha512-D+yHzq4a2r2Rrd0ZOW/mTZbgDIkUkD8ofKgusEI1xPiZz60Daks+UM7Me2ty5FzH3p/TgyhBpRrfIHx+ha20RQ== + "@prisma/engines@3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a": version "3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a" resolved "https://registry.npmjs.org/@prisma/engines/-/engines-3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a.tgz#7fa11bc26a51d450185c816cc0ab8cac673fb4bf"