{ "version": "6", "dialect": "sqlite", "id": "a499d0ef-cc64-470d-98e6-79b06f766cb9", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "audit_log": { "name": "audit_log", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "employee_id": { "name": "employee_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "company_id": { "name": "company_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "admin_id": { "name": "admin_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 0 }, "action": { "name": "action", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "detail": { "name": "detail", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": { "audit_employee_idx": { "name": "audit_employee_idx", "columns": ["employee_id"], "isUnique": false }, "audit_company_idx": { "name": "audit_company_idx", "columns": ["company_id"], "isUnique": false } }, "foreignKeys": { "audit_log_employee_id_employees_id_fk": { "name": "audit_log_employee_id_employees_id_fk", "tableFrom": "audit_log", "tableTo": "employees", "columnsFrom": ["employee_id"], "columnsTo": ["id"], "onDelete": "no action", "onUpdate": "no action" }, "audit_log_company_id_companies_id_fk": { "name": "audit_log_company_id_companies_id_fk", "tableFrom": "audit_log", "tableTo": "companies", "columnsFrom": ["company_id"], "columnsTo": ["id"], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "companies": { "name": "companies", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "employees": { "name": "employees", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "company_id": { "name": "company_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "is_active": { "name": "is_active", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": true }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(datetime('now'))" } }, "indexes": { "company_active_idx": { "name": "company_active_idx", "columns": ["company_id", "is_active"], "isUnique": false } }, "foreignKeys": { "employees_company_id_companies_id_fk": { "name": "employees_company_id_companies_id_fk", "tableFrom": "employees", "tableTo": "companies", "columnsFrom": ["company_id"], "columnsTo": ["id"], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "time_entries": { "name": "time_entries", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "employee_id": { "name": "employee_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "company_id": { "name": "company_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "timestamp": { "name": "timestamp", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(unixepoch())" }, "photo_base64": { "name": "photo_base64", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "is_deleted": { "name": "is_deleted", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": false } }, "indexes": { "employee_timestamp_idx": { "name": "employee_timestamp_idx", "columns": ["employee_id", "timestamp"], "isUnique": false }, "company_timestamp_idx": { "name": "company_timestamp_idx", "columns": ["company_id", "timestamp"], "isUnique": false } }, "foreignKeys": { "time_entries_employee_id_employees_id_fk": { "name": "time_entries_employee_id_employees_id_fk", "tableFrom": "time_entries", "tableTo": "employees", "columnsFrom": ["employee_id"], "columnsTo": ["id"], "onDelete": "no action", "onUpdate": "no action" }, "time_entries_company_id_companies_id_fk": { "name": "time_entries_company_id_companies_id_fk", "tableFrom": "time_entries", "tableTo": "companies", "columnsFrom": ["company_id"], "columnsTo": ["id"], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} } }, "views": {}, "enums": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "indexes": {} } }