{ "id": "14e39517-17ec-4e0a-a053-4707f3269d32", "prevId": "94b88cb8-1ed6-4475-b2d6-d1bf80b7b669", "version": "7", "dialect": "postgresql", "tables": { "public.account": { "name": "account", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "account_id": { "name": "account_id", "type": "text", "primaryKey": false, "notNull": true }, "provider_id": { "name": "provider_id", "type": "text", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "access_token": { "name": "access_token", "type": "text", "primaryKey": false, "notNull": false }, "refresh_token": { "name": "refresh_token", "type": "text", "primaryKey": false, "notNull": false }, "id_token": { "name": "id_token", "type": "text", "primaryKey": false, "notNull": false }, "access_token_expires_at": { "name": "access_token_expires_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "refresh_token_expires_at": { "name": "refresh_token_expires_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "scope": { "name": "scope", "type": "text", "primaryKey": false, "notNull": false }, "password": { "name": "password", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "account_user_id_user_id_fk": { "name": "account_user_id_user_id_fk", "tableFrom": "account", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.agent_session": { "name": "agent_session", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "device_id": { "name": "device_id", "type": "text", "primaryKey": false, "notNull": true }, "goal": { "name": "goal", "type": "text", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'running'" }, "steps_used": { "name": "steps_used", "type": "integer", "primaryKey": false, "notNull": false, "default": 0 }, "started_at": { "name": "started_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "completed_at": { "name": "completed_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "agent_session_user_id_user_id_fk": { "name": "agent_session_user_id_user_id_fk", "tableFrom": "agent_session", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "agent_session_device_id_device_id_fk": { "name": "agent_session_device_id_device_id_fk", "tableFrom": "agent_session", "tableTo": "device", "columnsFrom": [ "device_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.agent_step": { "name": "agent_step", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "session_id": { "name": "session_id", "type": "text", "primaryKey": false, "notNull": true }, "step_number": { "name": "step_number", "type": "integer", "primaryKey": false, "notNull": true }, "screen_hash": { "name": "screen_hash", "type": "text", "primaryKey": false, "notNull": false }, "action": { "name": "action", "type": "jsonb", "primaryKey": false, "notNull": false }, "reasoning": { "name": "reasoning", "type": "text", "primaryKey": false, "notNull": false }, "result": { "name": "result", "type": "text", "primaryKey": false, "notNull": false }, "timestamp": { "name": "timestamp", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "agent_step_session_id_agent_session_id_fk": { "name": "agent_step_session_id_agent_session_id_fk", "tableFrom": "agent_step", "tableTo": "agent_session", "columnsFrom": [ "session_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.apikey": { "name": "apikey", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": false }, "start": { "name": "start", "type": "text", "primaryKey": false, "notNull": false }, "prefix": { "name": "prefix", "type": "text", "primaryKey": false, "notNull": false }, "key": { "name": "key", "type": "text", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "refill_interval": { "name": "refill_interval", "type": "integer", "primaryKey": false, "notNull": false }, "refill_amount": { "name": "refill_amount", "type": "integer", "primaryKey": false, "notNull": false }, "last_refill_at": { "name": "last_refill_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "enabled": { "name": "enabled", "type": "boolean", "primaryKey": false, "notNull": false, "default": true }, "rate_limit_enabled": { "name": "rate_limit_enabled", "type": "boolean", "primaryKey": false, "notNull": false, "default": true }, "rate_limit_time_window": { "name": "rate_limit_time_window", "type": "integer", "primaryKey": false, "notNull": false, "default": 86400000 }, "rate_limit_max": { "name": "rate_limit_max", "type": "integer", "primaryKey": false, "notNull": false, "default": 10 }, "request_count": { "name": "request_count", "type": "integer", "primaryKey": false, "notNull": false, "default": 0 }, "remaining": { "name": "remaining", "type": "integer", "primaryKey": false, "notNull": false }, "last_request": { "name": "last_request", "type": "timestamp", "primaryKey": false, "notNull": false }, "expires_at": { "name": "expires_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true }, "permissions": { "name": "permissions", "type": "text", "primaryKey": false, "notNull": false }, "metadata": { "name": "metadata", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "apikey_user_id_user_id_fk": { "name": "apikey_user_id_user_id_fk", "tableFrom": "apikey", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.device": { "name": "device", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "last_seen": { "name": "last_seen", "type": "timestamp", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'offline'" }, "device_info": { "name": "device_info", "type": "jsonb", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "device_user_id_user_id_fk": { "name": "device_user_id_user_id_fk", "tableFrom": "device", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.llm_config": { "name": "llm_config", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "provider": { "name": "provider", "type": "text", "primaryKey": false, "notNull": true }, "api_key": { "name": "api_key", "type": "text", "primaryKey": false, "notNull": true }, "model": { "name": "model", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "llm_config_user_id_user_id_fk": { "name": "llm_config_user_id_user_id_fk", "tableFrom": "llm_config", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.session": { "name": "session", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true }, "ip_address": { "name": "ip_address", "type": "text", "primaryKey": false, "notNull": false }, "user_agent": { "name": "user_agent", "type": "text", "primaryKey": false, "notNull": false }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true } }, "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": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "session_token_unique": { "name": "session_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user": { "name": "user", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_verified": { "name": "email_verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "image": { "name": "image", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_email_unique": { "name": "user_email_unique", "nullsNotDistinct": false, "columns": [ "email" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.verification": { "name": "verification", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "identifier": { "name": "identifier", "type": "text", "primaryKey": false, "notNull": true }, "value": { "name": "value", "type": "text", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": {}, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }