From cdf34c3b06f8d4165e51fd8c6b07ee2fe74be4b7 Mon Sep 17 00:00:00 2001 From: ludavidca Date: Tue, 1 Oct 2024 20:15:26 -0400 Subject: [PATCH] reverted files to main --- README.md | 5 +-- docker-compose.yml | 1 - prisma/seed/.snaplet/dataModel.json | 62 +++++++++++++++++++++-------- 3 files changed, 47 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index bbf759d..bbd047c 100644 --- a/README.md +++ b/README.md @@ -137,14 +137,12 @@ docker system prune -a --volumes ### Accessing PostgreSQL Database Run in two lines (View Absences Table): - ```bash docker exec -it sistema-db-1 psql -U sistema -d sistema SELECT * FROM public."Absence"; ``` Running the commands line by line. - ```bash # run a bash shell in the container docker exec -it sistema-db-1 /bin/bash @@ -162,8 +160,7 @@ SELECT * FROM public.""; ``` ### Seeding the Production Database - -\*\* Database seeds automatically locally when docker compose build --up is run. Only run the following commands to seed the production database. +** Database seeds automatically locally when docker compose build --up is run. Only run the following commands to seed the production database. In the schema.prisma, set env variable to VERCEL_DATABASE_NON_POOLING. Then run the following command. diff --git a/docker-compose.yml b/docker-compose.yml index 1719d61..1a7141d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,6 @@ services: - db volumes: - .:/sistema - - /sistema/node_modules environment: - NODE_ENV=development - WATCHPACK_POLLING=true diff --git a/prisma/seed/.snaplet/dataModel.json b/prisma/seed/.snaplet/dataModel.json index e68835f..b5db21d 100644 --- a/prisma/seed/.snaplet/dataModel.json +++ b/prisma/seed/.snaplet/dataModel.json @@ -127,8 +127,12 @@ "isRequired": true, "kind": "object", "relationName": "AbsenceToLocation", - "relationFromFields": ["locationId"], - "relationToFields": ["id"], + "relationFromFields": [ + "locationId" + ], + "relationToFields": [ + "id" + ], "isList": false, "isId": false, "isGenerated": false, @@ -141,8 +145,12 @@ "isRequired": true, "kind": "object", "relationName": "AbsenceToSubject", - "relationFromFields": ["subjectId"], - "relationToFields": ["id"], + "relationFromFields": [ + "subjectId" + ], + "relationToFields": [ + "id" + ], "isList": false, "isId": false, "isGenerated": false, @@ -155,8 +163,12 @@ "isRequired": true, "kind": "object", "relationName": "Absence_absentTeacherIdToUser", - "relationFromFields": ["absentTeacherId"], - "relationToFields": ["id"], + "relationFromFields": [ + "absentTeacherId" + ], + "relationToFields": [ + "id" + ], "isList": false, "isId": false, "isGenerated": false, @@ -169,8 +181,12 @@ "isRequired": false, "kind": "object", "relationName": "Absence_substituteTeacherIdToUser", - "relationFromFields": ["substituteTeacherId"], - "relationToFields": ["id"], + "relationFromFields": [ + "substituteTeacherId" + ], + "relationToFields": [ + "id" + ], "isList": false, "isId": false, "isGenerated": false, @@ -181,7 +197,9 @@ "uniqueConstraints": [ { "name": "Absence_pkey", - "fields": ["id"], + "fields": [ + "id" + ], "nullNotDistinct": false } ] @@ -255,7 +273,9 @@ "uniqueConstraints": [ { "name": "Location_pkey", - "fields": ["id"], + "fields": [ + "id" + ], "nullNotDistinct": false } ] @@ -315,7 +335,9 @@ "uniqueConstraints": [ { "name": "MailingList_pkey", - "fields": ["id"], + "fields": [ + "id" + ], "nullNotDistinct": false } ] @@ -389,7 +411,9 @@ "uniqueConstraints": [ { "name": "Subject_pkey", - "fields": ["id"], + "fields": [ + "id" + ], "nullNotDistinct": false } ] @@ -547,17 +571,23 @@ "uniqueConstraints": [ { "name": "User_pkey", - "fields": ["id"], + "fields": [ + "id" + ], "nullNotDistinct": false }, { "name": "User_authId_key", - "fields": ["authId"], + "fields": [ + "authId" + ], "nullNotDistinct": false }, { "name": "User_email_key", - "fields": ["email"], + "fields": [ + "email" + ], "nullNotDistinct": false } ] @@ -590,4 +620,4 @@ ] } } -} +} \ No newline at end of file