| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771 |
- {
- "id": "689081c0-94c4-4c90-a1ee-ccdce86fbe77",
- "prevId": "a52e7c22-a395-4c42-b9eb-2093435413bb",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.attendance": {
- "name": "attendance",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "student_id": {
- "name": "student_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "class_id": {
- "name": "class_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "section_id": {
- "name": "section_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "teacher_id": {
- "name": "teacher_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "partial_id": {
- "name": "partial_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "date": {
- "name": "date",
- "type": "date",
- "primaryKey": false,
- "notNull": true
- },
- "status": {
- "name": "status",
- "type": "varchar(20)",
- "primaryKey": false,
- "notNull": true
- },
- "reason": {
- "name": "reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "attendance_student_id_users_id_fk": {
- "name": "attendance_student_id_users_id_fk",
- "tableFrom": "attendance",
- "tableTo": "users",
- "columnsFrom": [
- "student_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "attendance_class_id_classes_id_fk": {
- "name": "attendance_class_id_classes_id_fk",
- "tableFrom": "attendance",
- "tableTo": "classes",
- "columnsFrom": [
- "class_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "attendance_section_id_sections_id_fk": {
- "name": "attendance_section_id_sections_id_fk",
- "tableFrom": "attendance",
- "tableTo": "sections",
- "columnsFrom": [
- "section_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "attendance_teacher_id_users_id_fk": {
- "name": "attendance_teacher_id_users_id_fk",
- "tableFrom": "attendance",
- "tableTo": "users",
- "columnsFrom": [
- "teacher_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "attendance_partial_id_partials_id_fk": {
- "name": "attendance_partial_id_partials_id_fk",
- "tableFrom": "attendance",
- "tableTo": "partials",
- "columnsFrom": [
- "partial_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.classes": {
- "name": "classes",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "name": {
- "name": "name",
- "type": "varchar(100)",
- "primaryKey": false,
- "notNull": true
- },
- "code": {
- "name": "code",
- "type": "varchar(20)",
- "primaryKey": false,
- "notNull": true
- },
- "credits": {
- "name": "credits",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "period_id": {
- "name": "period_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "is_active": {
- "name": "is_active",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "classes_period_id_periods_id_fk": {
- "name": "classes_period_id_periods_id_fk",
- "tableFrom": "classes",
- "tableTo": "periods",
- "columnsFrom": [
- "period_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "classes_code_unique": {
- "name": "classes_code_unique",
- "nullsNotDistinct": false,
- "columns": [
- "code"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.partials": {
- "name": "partials",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "name": {
- "name": "name",
- "type": "varchar(100)",
- "primaryKey": false,
- "notNull": true
- },
- "period_id": {
- "name": "period_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "start_date": {
- "name": "start_date",
- "type": "date",
- "primaryKey": false,
- "notNull": true
- },
- "end_date": {
- "name": "end_date",
- "type": "date",
- "primaryKey": false,
- "notNull": true
- },
- "is_active": {
- "name": "is_active",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "partials_period_id_periods_id_fk": {
- "name": "partials_period_id_periods_id_fk",
- "tableFrom": "partials",
- "tableTo": "periods",
- "columnsFrom": [
- "period_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.periods": {
- "name": "periods",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "name": {
- "name": "name",
- "type": "varchar(100)",
- "primaryKey": false,
- "notNull": true
- },
- "start_date": {
- "name": "start_date",
- "type": "date",
- "primaryKey": false,
- "notNull": true
- },
- "end_date": {
- "name": "end_date",
- "type": "date",
- "primaryKey": false,
- "notNull": true
- },
- "is_active": {
- "name": "is_active",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.sections": {
- "name": "sections",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "name": {
- "name": "name",
- "type": "varchar(50)",
- "primaryKey": false,
- "notNull": true
- },
- "class_id": {
- "name": "class_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "period_id": {
- "name": "period_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "max_students": {
- "name": "max_students",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "is_active": {
- "name": "is_active",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "sections_class_id_classes_id_fk": {
- "name": "sections_class_id_classes_id_fk",
- "tableFrom": "sections",
- "tableTo": "classes",
- "columnsFrom": [
- "class_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "sections_period_id_periods_id_fk": {
- "name": "sections_period_id_periods_id_fk",
- "tableFrom": "sections",
- "tableTo": "periods",
- "columnsFrom": [
- "period_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.student_enrollments": {
- "name": "student_enrollments",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "student_id": {
- "name": "student_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "class_id": {
- "name": "class_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "section_id": {
- "name": "section_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "is_active": {
- "name": "is_active",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "student_enrollments_student_id_users_id_fk": {
- "name": "student_enrollments_student_id_users_id_fk",
- "tableFrom": "student_enrollments",
- "tableTo": "users",
- "columnsFrom": [
- "student_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "student_enrollments_class_id_classes_id_fk": {
- "name": "student_enrollments_class_id_classes_id_fk",
- "tableFrom": "student_enrollments",
- "tableTo": "classes",
- "columnsFrom": [
- "class_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "student_enrollments_section_id_sections_id_fk": {
- "name": "student_enrollments_section_id_sections_id_fk",
- "tableFrom": "student_enrollments",
- "tableTo": "sections",
- "columnsFrom": [
- "section_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.teacher_assignments": {
- "name": "teacher_assignments",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "teacher_id": {
- "name": "teacher_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "class_id": {
- "name": "class_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "section_id": {
- "name": "section_id",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "is_active": {
- "name": "is_active",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "teacher_assignments_teacher_id_users_id_fk": {
- "name": "teacher_assignments_teacher_id_users_id_fk",
- "tableFrom": "teacher_assignments",
- "tableTo": "users",
- "columnsFrom": [
- "teacher_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "teacher_assignments_class_id_classes_id_fk": {
- "name": "teacher_assignments_class_id_classes_id_fk",
- "tableFrom": "teacher_assignments",
- "tableTo": "classes",
- "columnsFrom": [
- "class_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "teacher_assignments_section_id_sections_id_fk": {
- "name": "teacher_assignments_section_id_sections_id_fk",
- "tableFrom": "teacher_assignments",
- "tableTo": "sections",
- "columnsFrom": [
- "section_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.users": {
- "name": "users",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "first_name": {
- "name": "first_name",
- "type": "varchar(100)",
- "primaryKey": false,
- "notNull": true
- },
- "last_name": {
- "name": "last_name",
- "type": "varchar(100)",
- "primaryKey": false,
- "notNull": true
- },
- "cedula": {
- "name": "cedula",
- "type": "varchar(20)",
- "primaryKey": false,
- "notNull": true
- },
- "phone": {
- "name": "phone",
- "type": "varchar(20)",
- "primaryKey": false,
- "notNull": false
- },
- "role": {
- "name": "role",
- "type": "varchar(20)",
- "primaryKey": false,
- "notNull": true
- },
- "admission_number": {
- "name": "admission_number",
- "type": "varchar(50)",
- "primaryKey": false,
- "notNull": false
- },
- "is_active": {
- "name": "is_active",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "users_email_unique": {
- "name": "users_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- },
- "users_cedula_unique": {
- "name": "users_cedula_unique",
- "nullsNotDistinct": false,
- "columns": [
- "cedula"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {},
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
- }
|