diff --git a/.snaplet/config.json b/.snaplet/config.json deleted file mode 100644 index 22b9895..0000000 --- a/.snaplet/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "adapter": "prisma" -} diff --git a/.snaplet/dataModel.json b/.snaplet/dataModel.json deleted file mode 100644 index a96aa4c..0000000 --- a/.snaplet/dataModel.json +++ /dev/null @@ -1,719 +0,0 @@ -{ - "models": { - "Absence": { - "id": "public.Absence", - "schemaName": "public", - "tableName": "Absence", - "fields": [ - { - "id": "public.Absence.id", - "name": "id", - "columnName": "id", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": { - "identifier": "\"public\".\"Absence_id_seq\"", - "increment": 1, - "start": 1 - }, - "hasDefaultValue": true, - "isId": true, - "maxLength": null - }, - { - "id": "public.Absence.absentTeacherId", - "name": "absentTeacherId", - "columnName": "absentTeacherId", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.Absence.lessonDate", - "name": "lessonDate", - "columnName": "lessonDate", - "type": "timestamp", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.Absence.lessonPlan", - "name": "lessonPlan", - "columnName": "lessonPlan", - "type": "text", - "isRequired": false, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.Absence.reasonOfAbsence", - "name": "reasonOfAbsence", - "columnName": "reasonOfAbsence", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.Absence.substituteTeacherId", - "name": "substituteTeacherId", - "columnName": "substituteTeacherId", - "type": "int4", - "isRequired": false, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.Absence.locationId", - "name": "locationId", - "columnName": "locationId", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.Absence.subjectId", - "name": "subjectId", - "columnName": "subjectId", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "name": "Location", - "type": "Location", - "isRequired": true, - "kind": "object", - "relationName": "AbsenceToLocation", - "relationFromFields": ["locationId"], - "relationToFields": ["id"], - "isList": false, - "isId": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false - }, - { - "name": "Subject", - "type": "Subject", - "isRequired": true, - "kind": "object", - "relationName": "AbsenceToSubject", - "relationFromFields": ["subjectId"], - "relationToFields": ["id"], - "isList": false, - "isId": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false - }, - { - "name": "User_Absence_absentTeacherIdToUser", - "type": "User", - "isRequired": true, - "kind": "object", - "relationName": "Absence_absentTeacherIdToUser", - "relationFromFields": ["absentTeacherId"], - "relationToFields": ["id"], - "isList": false, - "isId": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false - }, - { - "name": "User_Absence_substituteTeacherIdToUser", - "type": "User", - "isRequired": false, - "kind": "object", - "relationName": "Absence_substituteTeacherIdToUser", - "relationFromFields": ["substituteTeacherId"], - "relationToFields": ["id"], - "isList": false, - "isId": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false - } - ], - "uniqueConstraints": [ - { - "name": "Absence_pkey", - "fields": ["id"], - "nullNotDistinct": false - } - ] - }, - "Location": { - "id": "public.Location", - "schemaName": "public", - "tableName": "Location", - "fields": [ - { - "id": "public.Location.id", - "name": "id", - "columnName": "id", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": { - "identifier": "\"public\".\"Location_id_seq\"", - "increment": 1, - "start": 1 - }, - "hasDefaultValue": true, - "isId": true, - "maxLength": null - }, - { - "id": "public.Location.name", - "name": "name", - "columnName": "name", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.Location.abbreviation", - "name": "abbreviation", - "columnName": "abbreviation", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "name": "Absence", - "type": "Absence", - "isRequired": false, - "kind": "object", - "relationName": "AbsenceToLocation", - "relationFromFields": [], - "relationToFields": [], - "isList": true, - "isId": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false - } - ], - "uniqueConstraints": [ - { - "name": "Location_pkey", - "fields": ["id"], - "nullNotDistinct": false - } - ] - }, - "MailingList": { - "id": "public.MailingList", - "schemaName": "public", - "tableName": "MailingList", - "fields": [ - { - "id": "public.MailingList.id", - "name": "id", - "columnName": "id", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": { - "identifier": "\"public\".\"MailingList_id_seq\"", - "increment": 1, - "start": 1 - }, - "hasDefaultValue": true, - "isId": true, - "maxLength": null - }, - { - "id": "public.MailingList.name", - "name": "name", - "columnName": "name", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.MailingList.emails", - "name": "emails", - "columnName": "emails", - "type": "text[]", - "isRequired": false, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - } - ], - "uniqueConstraints": [ - { - "name": "MailingList_pkey", - "fields": ["id"], - "nullNotDistinct": false - } - ] - }, - "Subject": { - "id": "public.Subject", - "schemaName": "public", - "tableName": "Subject", - "fields": [ - { - "id": "public.Subject.id", - "name": "id", - "columnName": "id", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": { - "identifier": "\"public\".\"Subject_id_seq\"", - "increment": 1, - "start": 1 - }, - "hasDefaultValue": true, - "isId": true, - "maxLength": null - }, - { - "id": "public.Subject.name", - "name": "name", - "columnName": "name", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.Subject.abbreviation", - "name": "abbreviation", - "columnName": "abbreviation", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "name": "Absence", - "type": "Absence", - "isRequired": false, - "kind": "object", - "relationName": "AbsenceToSubject", - "relationFromFields": [], - "relationToFields": [], - "isList": true, - "isId": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false - } - ], - "uniqueConstraints": [ - { - "name": "Subject_pkey", - "fields": ["id"], - "nullNotDistinct": false - } - ] - }, - "User": { - "id": "public.User", - "schemaName": "public", - "tableName": "User", - "fields": [ - { - "id": "public.User.id", - "name": "id", - "columnName": "id", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": { - "identifier": "\"public\".\"User_id_seq\"", - "increment": 1, - "start": 1 - }, - "hasDefaultValue": true, - "isId": true, - "maxLength": null - }, - { - "id": "public.User.authId", - "name": "authId", - "columnName": "authId", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.User.email", - "name": "email", - "columnName": "email", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.User.firstName", - "name": "firstName", - "columnName": "firstName", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.User.lastName", - "name": "lastName", - "columnName": "lastName", - "type": "text", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public.User.role", - "name": "role", - "columnName": "role", - "type": "Role", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": true, - "isId": false, - "maxLength": null - }, - { - "id": "public.User.status", - "name": "status", - "columnName": "status", - "type": "Status", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": true, - "isId": false, - "maxLength": null - }, - { - "id": "public.User.numOfAbsences", - "name": "numOfAbsences", - "columnName": "numOfAbsences", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": true, - "isId": false, - "maxLength": null - }, - { - "name": "Absence_Absence_absentTeacherIdToUser", - "type": "Absence", - "isRequired": false, - "kind": "object", - "relationName": "Absence_absentTeacherIdToUser", - "relationFromFields": [], - "relationToFields": [], - "isList": true, - "isId": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false - }, - { - "name": "Absence_Absence_substituteTeacherIdToUser", - "type": "Absence", - "isRequired": false, - "kind": "object", - "relationName": "Absence_substituteTeacherIdToUser", - "relationFromFields": [], - "relationToFields": [], - "isList": true, - "isId": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false - } - ], - "uniqueConstraints": [ - { - "name": "User_pkey", - "fields": ["id"], - "nullNotDistinct": false - }, - { - "name": "User_authId_key", - "fields": ["authId"], - "nullNotDistinct": false - }, - { - "name": "User_email_key", - "fields": ["email"], - "nullNotDistinct": false - } - ] - }, - "_prisma_migrations": { - "id": "public._prisma_migrations", - "schemaName": "public", - "tableName": "_prisma_migrations", - "fields": [ - { - "id": "public._prisma_migrations.id", - "name": "id", - "columnName": "id", - "type": "varchar", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": true, - "maxLength": 36 - }, - { - "id": "public._prisma_migrations.checksum", - "name": "checksum", - "columnName": "checksum", - "type": "varchar", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": 64 - }, - { - "id": "public._prisma_migrations.finished_at", - "name": "finished_at", - "columnName": "finished_at", - "type": "timestamptz", - "isRequired": false, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public._prisma_migrations.migration_name", - "name": "migration_name", - "columnName": "migration_name", - "type": "varchar", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": 255 - }, - { - "id": "public._prisma_migrations.logs", - "name": "logs", - "columnName": "logs", - "type": "text", - "isRequired": false, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public._prisma_migrations.rolled_back_at", - "name": "rolled_back_at", - "columnName": "rolled_back_at", - "type": "timestamptz", - "isRequired": false, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": false, - "isId": false, - "maxLength": null - }, - { - "id": "public._prisma_migrations.started_at", - "name": "started_at", - "columnName": "started_at", - "type": "timestamptz", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": true, - "isId": false, - "maxLength": null - }, - { - "id": "public._prisma_migrations.applied_steps_count", - "name": "applied_steps_count", - "columnName": "applied_steps_count", - "type": "int4", - "isRequired": true, - "kind": "scalar", - "isList": false, - "isGenerated": false, - "sequence": false, - "hasDefaultValue": true, - "isId": false, - "maxLength": null - } - ], - "uniqueConstraints": [ - { - "name": "_prisma_migrations_pkey", - "fields": ["id"], - "nullNotDistinct": false - } - ] - } - }, - "enums": { - "Role": { - "schemaName": "public", - "values": [ - { - "name": "ADMIN" - }, - { - "name": "TEACHER" - } - ] - }, - "Status": { - "schemaName": "public", - "values": [ - { - "name": "ACTIVE" - }, - { - "name": "DEACTIVATED" - }, - { - "name": "INVITED" - } - ] - } - } -} diff --git a/prisma/seed/seed.config.ts b/prisma/seed/seed.config.ts deleted file mode 100644 index 30f977c..0000000 --- a/prisma/seed/seed.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { SeedPrisma } from '@snaplet/seed/adapter-prisma'; -import { defineConfig } from '@snaplet/seed/config'; -import { PrismaClient } from '@prisma/client'; - -export default defineConfig({ - adapter: () => { - const client = new PrismaClient(); - return new SeedPrisma(client); - }, - select: ['!*_prisma_migrations'], -});