From e1592cf4b63f38af072b4cd9ea64a7cf6f022741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?= <31509435+aleksasiriski@users.noreply.github.com> Date: Sun, 29 Dec 2024 21:43:54 +0100 Subject: [PATCH] fix: format --- drizzle/meta/0002_snapshot.json | 1252 ++++++++++++++----------------- drizzle/meta/_journal.json | 52 +- 2 files changed, 607 insertions(+), 697 deletions(-) diff --git a/drizzle/meta/0002_snapshot.json b/drizzle/meta/0002_snapshot.json index 2fc8fda..5242ca5 100644 --- a/drizzle/meta/0002_snapshot.json +++ b/drizzle/meta/0002_snapshot.json @@ -1,672 +1,582 @@ { - "id": "1cc87795-fd3f-49c6-b581-3f20f9bae437", - "prevId": "ef3a670f-5fce-4e89-a160-fbd5cc85d92a", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.building": { - "name": "building", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "building_name_unique": { - "name": "building_name_unique", - "nullsNotDistinct": false, - "columns": [ - "name" - ] - } - } - }, - "public.department": { - "name": "department", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "department_name_unique": { - "name": "department_name_unique", - "nullsNotDistinct": false, - "columns": [ - "name" - ] - } - } - }, - "public.employee": { - "name": "employee", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "fname": { - "name": "fname", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "lname": { - "name": "lname", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "department": { - "name": "department", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "employee_department_department_name_fk": { - "name": "employee_department_department_name_fk", - "tableFrom": "employee", - "tableTo": "department", - "columnsFrom": [ - "department" - ], - "columnsTo": [ - "name" - ], - "onDelete": "restrict", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "employee_email_unique": { - "name": "employee_email_unique", - "nullsNotDistinct": false, - "columns": [ - "email" - ] - } - } - }, - "public.employee_entry": { - "name": "employee_entry", - "schema": "", - "columns": { - "employee_id": { - "name": "employee_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "timestamp": { - "name": "timestamp", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "building": { - "name": "building", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "creator": { - "name": "creator", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "employee_entry_employee_id_employee_id_fk": { - "name": "employee_entry_employee_id_employee_id_fk", - "tableFrom": "employee_entry", - "tableTo": "employee", - "columnsFrom": [ - "employee_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "employee_entry_building_building_name_fk": { - "name": "employee_entry_building_building_name_fk", - "tableFrom": "employee_entry", - "tableTo": "building", - "columnsFrom": [ - "building" - ], - "columnsTo": [ - "name" - ], - "onDelete": "restrict", - "onUpdate": "no action" - }, - "employee_entry_creator_user_username_fk": { - "name": "employee_entry_creator_user_username_fk", - "tableFrom": "employee_entry", - "tableTo": "user", - "columnsFrom": [ - "creator" - ], - "columnsTo": [ - "username" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "employee_entry_employee_id_timestamp_pk": { - "name": "employee_entry_employee_id_timestamp_pk", - "columns": [ - "employee_id", - "timestamp" - ] - } - }, - "uniqueConstraints": {} - }, - "public.employee_exit": { - "name": "employee_exit", - "schema": "", - "columns": { - "employee_id": { - "name": "employee_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "timestamp": { - "name": "timestamp", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "building": { - "name": "building", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "creator": { - "name": "creator", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "employee_exit_employee_id_employee_id_fk": { - "name": "employee_exit_employee_id_employee_id_fk", - "tableFrom": "employee_exit", - "tableTo": "employee", - "columnsFrom": [ - "employee_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "employee_exit_building_building_name_fk": { - "name": "employee_exit_building_building_name_fk", - "tableFrom": "employee_exit", - "tableTo": "building", - "columnsFrom": [ - "building" - ], - "columnsTo": [ - "name" - ], - "onDelete": "restrict", - "onUpdate": "no action" - }, - "employee_exit_creator_user_username_fk": { - "name": "employee_exit_creator_user_username_fk", - "tableFrom": "employee_exit", - "tableTo": "user", - "columnsFrom": [ - "creator" - ], - "columnsTo": [ - "username" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "employee_exit_employee_id_timestamp_pk": { - "name": "employee_exit_employee_id_timestamp_pk", - "columns": [ - "employee_id", - "timestamp" - ] - } - }, - "uniqueConstraints": {} - }, - "public.session": { - "name": "session", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "building": { - "name": "building", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "timestamp": { - "name": "timestamp", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "session_user_id_user_id_fk": { - "name": "session_user_id_user_id_fk", - "tableFrom": "session", - "tableTo": "user", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "session_building_building_name_fk": { - "name": "session_building_building_name_fk", - "tableFrom": "session", - "tableTo": "building", - "columnsFrom": [ - "building" - ], - "columnsTo": [ - "name" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.student": { - "name": "student", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "index": { - "name": "index", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "fname": { - "name": "fname", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "lname": { - "name": "lname", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "department": { - "name": "department", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "student_department_department_name_fk": { - "name": "student_department_department_name_fk", - "tableFrom": "student", - "tableTo": "department", - "columnsFrom": [ - "department" - ], - "columnsTo": [ - "name" - ], - "onDelete": "restrict", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "student_index_unique": { - "name": "student_index_unique", - "nullsNotDistinct": false, - "columns": [ - "index" - ] - } - } - }, - "public.student_entry": { - "name": "student_entry", - "schema": "", - "columns": { - "student_id": { - "name": "student_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "timestamp": { - "name": "timestamp", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "building": { - "name": "building", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "creator": { - "name": "creator", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "student_entry_student_id_student_id_fk": { - "name": "student_entry_student_id_student_id_fk", - "tableFrom": "student_entry", - "tableTo": "student", - "columnsFrom": [ - "student_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "student_entry_building_building_name_fk": { - "name": "student_entry_building_building_name_fk", - "tableFrom": "student_entry", - "tableTo": "building", - "columnsFrom": [ - "building" - ], - "columnsTo": [ - "name" - ], - "onDelete": "restrict", - "onUpdate": "no action" - }, - "student_entry_creator_user_username_fk": { - "name": "student_entry_creator_user_username_fk", - "tableFrom": "student_entry", - "tableTo": "user", - "columnsFrom": [ - "creator" - ], - "columnsTo": [ - "username" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "student_entry_student_id_timestamp_pk": { - "name": "student_entry_student_id_timestamp_pk", - "columns": [ - "student_id", - "timestamp" - ] - } - }, - "uniqueConstraints": {} - }, - "public.student_exit": { - "name": "student_exit", - "schema": "", - "columns": { - "student_id": { - "name": "student_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "timestamp": { - "name": "timestamp", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "building": { - "name": "building", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "creator": { - "name": "creator", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "student_exit_student_id_student_id_fk": { - "name": "student_exit_student_id_student_id_fk", - "tableFrom": "student_exit", - "tableTo": "student", - "columnsFrom": [ - "student_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "student_exit_building_building_name_fk": { - "name": "student_exit_building_building_name_fk", - "tableFrom": "student_exit", - "tableTo": "building", - "columnsFrom": [ - "building" - ], - "columnsTo": [ - "name" - ], - "onDelete": "restrict", - "onUpdate": "no action" - }, - "student_exit_creator_user_username_fk": { - "name": "student_exit_creator_user_username_fk", - "tableFrom": "student_exit", - "tableTo": "user", - "columnsFrom": [ - "creator" - ], - "columnsTo": [ - "username" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "student_exit_student_id_timestamp_pk": { - "name": "student_exit_student_id_timestamp_pk", - "columns": [ - "student_id", - "timestamp" - ] - } - }, - "uniqueConstraints": {} - }, - "public.ratelimit": { - "name": "ratelimit", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "timestamp": { - "name": "timestamp", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "lock": { - "name": "lock", - "type": "boolean", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "ratelimit_user_id_user_id_fk": { - "name": "ratelimit_user_id_user_id_fk", - "tableFrom": "ratelimit", - "tableTo": "user", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user": { - "name": "user", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "password_hash": { - "name": "password_hash", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "user_username_unique": { - "name": "user_username_unique", - "nullsNotDistinct": false, - "columns": [ - "username" - ] - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file + "id": "1cc87795-fd3f-49c6-b581-3f20f9bae437", + "prevId": "ef3a670f-5fce-4e89-a160-fbd5cc85d92a", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.building": { + "name": "building", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "building_name_unique": { + "name": "building_name_unique", + "nullsNotDistinct": false, + "columns": ["name"] + } + } + }, + "public.department": { + "name": "department", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "department_name_unique": { + "name": "department_name_unique", + "nullsNotDistinct": false, + "columns": ["name"] + } + } + }, + "public.employee": { + "name": "employee", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "fname": { + "name": "fname", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "lname": { + "name": "lname", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "employee_department_department_name_fk": { + "name": "employee_department_department_name_fk", + "tableFrom": "employee", + "tableTo": "department", + "columnsFrom": ["department"], + "columnsTo": ["name"], + "onDelete": "restrict", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "employee_email_unique": { + "name": "employee_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + } + }, + "public.employee_entry": { + "name": "employee_entry", + "schema": "", + "columns": { + "employee_id": { + "name": "employee_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "building": { + "name": "building", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "creator": { + "name": "creator", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "employee_entry_employee_id_employee_id_fk": { + "name": "employee_entry_employee_id_employee_id_fk", + "tableFrom": "employee_entry", + "tableTo": "employee", + "columnsFrom": ["employee_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "employee_entry_building_building_name_fk": { + "name": "employee_entry_building_building_name_fk", + "tableFrom": "employee_entry", + "tableTo": "building", + "columnsFrom": ["building"], + "columnsTo": ["name"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "employee_entry_creator_user_username_fk": { + "name": "employee_entry_creator_user_username_fk", + "tableFrom": "employee_entry", + "tableTo": "user", + "columnsFrom": ["creator"], + "columnsTo": ["username"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "employee_entry_employee_id_timestamp_pk": { + "name": "employee_entry_employee_id_timestamp_pk", + "columns": ["employee_id", "timestamp"] + } + }, + "uniqueConstraints": {} + }, + "public.employee_exit": { + "name": "employee_exit", + "schema": "", + "columns": { + "employee_id": { + "name": "employee_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "building": { + "name": "building", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "creator": { + "name": "creator", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "employee_exit_employee_id_employee_id_fk": { + "name": "employee_exit_employee_id_employee_id_fk", + "tableFrom": "employee_exit", + "tableTo": "employee", + "columnsFrom": ["employee_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "employee_exit_building_building_name_fk": { + "name": "employee_exit_building_building_name_fk", + "tableFrom": "employee_exit", + "tableTo": "building", + "columnsFrom": ["building"], + "columnsTo": ["name"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "employee_exit_creator_user_username_fk": { + "name": "employee_exit_creator_user_username_fk", + "tableFrom": "employee_exit", + "tableTo": "user", + "columnsFrom": ["creator"], + "columnsTo": ["username"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "employee_exit_employee_id_timestamp_pk": { + "name": "employee_exit_employee_id_timestamp_pk", + "columns": ["employee_id", "timestamp"] + } + }, + "uniqueConstraints": {} + }, + "public.session": { + "name": "session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "building": { + "name": "building", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "session_user_id_user_id_fk": { + "name": "session_user_id_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "session_building_building_name_fk": { + "name": "session_building_building_name_fk", + "tableFrom": "session", + "tableTo": "building", + "columnsFrom": ["building"], + "columnsTo": ["name"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.student": { + "name": "student", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "index": { + "name": "index", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "fname": { + "name": "fname", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "lname": { + "name": "lname", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "student_department_department_name_fk": { + "name": "student_department_department_name_fk", + "tableFrom": "student", + "tableTo": "department", + "columnsFrom": ["department"], + "columnsTo": ["name"], + "onDelete": "restrict", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "student_index_unique": { + "name": "student_index_unique", + "nullsNotDistinct": false, + "columns": ["index"] + } + } + }, + "public.student_entry": { + "name": "student_entry", + "schema": "", + "columns": { + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "building": { + "name": "building", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "creator": { + "name": "creator", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "student_entry_student_id_student_id_fk": { + "name": "student_entry_student_id_student_id_fk", + "tableFrom": "student_entry", + "tableTo": "student", + "columnsFrom": ["student_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "student_entry_building_building_name_fk": { + "name": "student_entry_building_building_name_fk", + "tableFrom": "student_entry", + "tableTo": "building", + "columnsFrom": ["building"], + "columnsTo": ["name"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "student_entry_creator_user_username_fk": { + "name": "student_entry_creator_user_username_fk", + "tableFrom": "student_entry", + "tableTo": "user", + "columnsFrom": ["creator"], + "columnsTo": ["username"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "student_entry_student_id_timestamp_pk": { + "name": "student_entry_student_id_timestamp_pk", + "columns": ["student_id", "timestamp"] + } + }, + "uniqueConstraints": {} + }, + "public.student_exit": { + "name": "student_exit", + "schema": "", + "columns": { + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "building": { + "name": "building", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "creator": { + "name": "creator", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "student_exit_student_id_student_id_fk": { + "name": "student_exit_student_id_student_id_fk", + "tableFrom": "student_exit", + "tableTo": "student", + "columnsFrom": ["student_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "student_exit_building_building_name_fk": { + "name": "student_exit_building_building_name_fk", + "tableFrom": "student_exit", + "tableTo": "building", + "columnsFrom": ["building"], + "columnsTo": ["name"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "student_exit_creator_user_username_fk": { + "name": "student_exit_creator_user_username_fk", + "tableFrom": "student_exit", + "tableTo": "user", + "columnsFrom": ["creator"], + "columnsTo": ["username"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "student_exit_student_id_timestamp_pk": { + "name": "student_exit_student_id_timestamp_pk", + "columns": ["student_id", "timestamp"] + } + }, + "uniqueConstraints": {} + }, + "public.ratelimit": { + "name": "ratelimit", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "lock": { + "name": "lock", + "type": "boolean", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "ratelimit_user_id_user_id_fk": { + "name": "ratelimit_user_id_user_id_fk", + "tableFrom": "ratelimit", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_username_unique": { + "name": "user_username_unique", + "nullsNotDistinct": false, + "columns": ["username"] + } + } + } + }, + "enums": {}, + "schemas": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index ddaeed0..0ff00fa 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -1,27 +1,27 @@ { - "version": "7", - "dialect": "postgresql", - "entries": [ - { - "idx": 0, - "version": "7", - "when": 1734108654159, - "tag": "0000_early_jimmy_woo", - "breakpoints": true - }, - { - "idx": 1, - "version": "7", - "when": 1734543952685, - "tag": "0001_steady_luke_cage", - "breakpoints": true - }, - { - "idx": 2, - "version": "7", - "when": 1735346155508, - "tag": "0002_known_marvel_apes", - "breakpoints": true - } - ] -} \ No newline at end of file + "version": "7", + "dialect": "postgresql", + "entries": [ + { + "idx": 0, + "version": "7", + "when": 1734108654159, + "tag": "0000_early_jimmy_woo", + "breakpoints": true + }, + { + "idx": 1, + "version": "7", + "when": 1734543952685, + "tag": "0001_steady_luke_cage", + "breakpoints": true + }, + { + "idx": 2, + "version": "7", + "when": 1735346155508, + "tag": "0002_known_marvel_apes", + "breakpoints": true + } + ] +}