{ "id": "bcb7ed22-334b-449b-871e-c64e973289ca", "prevId": "30efcb43-6f93-4c90-8251-b9305702c135", "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 }, "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.api_key": { "name": "api_key", "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 }, "key": { "name": "key", "type": "text", "primaryKey": false, "notNull": true }, "last_used": { "name": "last_used", "type": "timestamp", "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()" }, "expires_at": { "name": "expires_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "api_key_user_id_user_id_fk": { "name": "api_key_user_id_user_id_fk", "tableFrom": "api_key", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "api_key_key_unique": { "name": "api_key_key_unique", "nullsNotDistinct": false, "columns": ["key"] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.environment": { "name": "environment", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "variables": { "name": "variables", "type": "json", "primaryKey": false, "notNull": true }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "environment_user_id_user_id_fk": { "name": "environment_user_id_user_id_fk", "tableFrom": "environment", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "environment_user_id_unique": { "name": "environment_user_id_unique", "nullsNotDistinct": false, "columns": ["user_id"] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.marketplace": { "name": "marketplace", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "workflow_id": { "name": "workflow_id", "type": "text", "primaryKey": false, "notNull": true }, "state": { "name": "state", "type": "json", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "author_id": { "name": "author_id", "type": "text", "primaryKey": false, "notNull": true }, "author_name": { "name": "author_name", "type": "text", "primaryKey": false, "notNull": true }, "stars": { "name": "stars", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "views": { "name": "views", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "category": { "name": "category", "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": { "marketplace_workflow_id_workflow_id_fk": { "name": "marketplace_workflow_id_workflow_id_fk", "tableFrom": "marketplace", "tableTo": "workflow", "columnsFrom": ["workflow_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "marketplace_author_id_user_id_fk": { "name": "marketplace_author_id_user_id_fk", "tableFrom": "marketplace", "tableTo": "user", "columnsFrom": ["author_id"], "columnsTo": ["id"], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.marketplace_star": { "name": "marketplace_star", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "marketplace_id": { "name": "marketplace_id", "type": "text", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "user_marketplace_idx": { "name": "user_marketplace_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "marketplace_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "marketplace_star_marketplace_id_marketplace_id_fk": { "name": "marketplace_star_marketplace_id_marketplace_id_fk", "tableFrom": "marketplace_star", "tableTo": "marketplace", "columnsFrom": ["marketplace_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "marketplace_star_user_id_user_id_fk": { "name": "marketplace_star_user_id_user_id_fk", "tableFrom": "marketplace_star", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "no action", "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 }, "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.settings": { "name": "settings", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "general": { "name": "general", "type": "json", "primaryKey": false, "notNull": true }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "settings_user_id_user_id_fk": { "name": "settings_user_id_user_id_fk", "tableFrom": "settings", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "settings_user_id_unique": { "name": "settings_user_id_unique", "nullsNotDistinct": false, "columns": ["user_id"] } }, "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 }, "image": { "name": "image", "type": "text", "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 } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_email_unique": { "name": "user_email_unique", "nullsNotDistinct": false, "columns": ["email"] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_stats": { "name": "user_stats", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "total_manual_executions": { "name": "total_manual_executions", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "total_api_calls": { "name": "total_api_calls", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "total_webhook_triggers": { "name": "total_webhook_triggers", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "total_scheduled_executions": { "name": "total_scheduled_executions", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "total_tokens_used": { "name": "total_tokens_used", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "total_cost": { "name": "total_cost", "type": "numeric", "primaryKey": false, "notNull": true, "default": "'0'" }, "last_active": { "name": "last_active", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_stats_user_id_user_id_fk": { "name": "user_stats_user_id_user_id_fk", "tableFrom": "user_stats", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_stats_user_id_unique": { "name": "user_stats_user_id_unique", "nullsNotDistinct": false, "columns": ["user_id"] } }, "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": false }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.waitlist": { "name": "waitlist", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'pending'" }, "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": { "waitlist_email_unique": { "name": "waitlist_email_unique", "nullsNotDistinct": false, "columns": ["email"] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.webhook": { "name": "webhook", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "workflow_id": { "name": "workflow_id", "type": "text", "primaryKey": false, "notNull": true }, "path": { "name": "path", "type": "text", "primaryKey": false, "notNull": true }, "provider": { "name": "provider", "type": "text", "primaryKey": false, "notNull": false }, "provider_config": { "name": "provider_config", "type": "json", "primaryKey": false, "notNull": false }, "is_active": { "name": "is_active", "type": "boolean", "primaryKey": false, "notNull": true, "default": 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": { "path_idx": { "name": "path_idx", "columns": [ { "expression": "path", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "webhook_workflow_id_workflow_id_fk": { "name": "webhook_workflow_id_workflow_id_fk", "tableFrom": "webhook", "tableTo": "workflow", "columnsFrom": ["workflow_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.workflow": { "name": "workflow", "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 }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "state": { "name": "state", "type": "json", "primaryKey": false, "notNull": true }, "color": { "name": "color", "type": "text", "primaryKey": false, "notNull": true, "default": "'#3972F6'" }, "last_synced": { "name": "last_synced", "type": "timestamp", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true }, "is_deployed": { "name": "is_deployed", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "deployed_at": { "name": "deployed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "api_key": { "name": "api_key", "type": "text", "primaryKey": false, "notNull": false }, "is_published": { "name": "is_published", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "collaborators": { "name": "collaborators", "type": "json", "primaryKey": false, "notNull": true, "default": "'[]'" }, "run_count": { "name": "run_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "last_run_at": { "name": "last_run_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "variables": { "name": "variables", "type": "json", "primaryKey": false, "notNull": false, "default": "'{}'" } }, "indexes": {}, "foreignKeys": { "workflow_user_id_user_id_fk": { "name": "workflow_user_id_user_id_fk", "tableFrom": "workflow", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.workflow_logs": { "name": "workflow_logs", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "workflow_id": { "name": "workflow_id", "type": "text", "primaryKey": false, "notNull": true }, "execution_id": { "name": "execution_id", "type": "text", "primaryKey": false, "notNull": false }, "level": { "name": "level", "type": "text", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": true }, "duration": { "name": "duration", "type": "text", "primaryKey": false, "notNull": false }, "trigger": { "name": "trigger", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "metadata": { "name": "metadata", "type": "json", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "workflow_logs_workflow_id_workflow_id_fk": { "name": "workflow_logs_workflow_id_workflow_id_fk", "tableFrom": "workflow_logs", "tableTo": "workflow", "columnsFrom": ["workflow_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.workflow_schedule": { "name": "workflow_schedule", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "workflow_id": { "name": "workflow_id", "type": "text", "primaryKey": false, "notNull": true }, "cron_expression": { "name": "cron_expression", "type": "text", "primaryKey": false, "notNull": false }, "next_run_at": { "name": "next_run_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "last_ran_at": { "name": "last_ran_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "trigger_type": { "name": "trigger_type", "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, "default": "now()" } }, "indexes": {}, "foreignKeys": { "workflow_schedule_workflow_id_workflow_id_fk": { "name": "workflow_schedule_workflow_id_workflow_id_fk", "tableFrom": "workflow_schedule", "tableTo": "workflow", "columnsFrom": ["workflow_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "workflow_schedule_workflow_id_unique": { "name": "workflow_schedule_workflow_id_unique", "nullsNotDistinct": false, "columns": ["workflow_id"] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": {}, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }