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/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