{ "id": "0f909014-3256-4320-9da2-a39a3b68671c", "prevId": "fd79ece0-66f3-4238-a2ca-af44060363b5", "version": "7", "dialect": "postgresql", "tables": { "public.user": { "name": "user", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "company_id": { "name": "company_id", "type": "uuid", "primaryKey": false, "notNull": true }, "email": { "name": "email", "type": "varchar(255)", "primaryKey": false, "notNull": true }, "password_hash": { "name": "password_hash", "type": "varchar(255)", "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 }, "role": { "name": "role", "type": "user_role", "typeSchema": "public", "primaryKey": false, "notNull": true, "default": "'staff'" }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_company_id_company_id_fk": { "name": "user_company_id_company_id_fk", "tableFrom": "user", "tableTo": "company", "columnsFrom": [ "company_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.company": { "name": "company", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": true }, "phone": { "name": "phone", "type": "varchar(50)", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "varchar(255)", "primaryKey": false, "notNull": false }, "timezone": { "name": "timezone", "type": "varchar(100)", "primaryKey": false, "notNull": true, "default": "'America/Chicago'" }, "notes": { "name": "notes", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.location": { "name": "location", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "company_id": { "name": "company_id", "type": "uuid", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": true }, "address": { "name": "address", "type": "jsonb", "primaryKey": false, "notNull": false }, "phone": { "name": "phone", "type": "varchar(50)", "primaryKey": false, "notNull": false }, "email": { "name": "email", "type": "varchar(255)", "primaryKey": false, "notNull": false }, "timezone": { "name": "timezone", "type": "varchar(100)", "primaryKey": false, "notNull": false }, "is_active": { "name": "is_active", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "location_company_id_company_id_fk": { "name": "location_company_id_company_id_fk", "tableFrom": "location", "tableTo": "company", "columnsFrom": [ "company_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": { "public.user_role": { "name": "user_role", "schema": "public", "values": [ "admin", "manager", "staff", "technician", "instructor" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }