|
|
@@ -0,0 +1,771 @@
|
|
|
+{
|
|
|
+ "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": {}
|
|
|
+ }
|
|
|
+}
|