diff --git a/web/drizzle/0033_fantastic_marvel_boy.sql b/web/drizzle/0033_fantastic_marvel_boy.sql deleted file mode 100644 index 088987b..0000000 --- a/web/drizzle/0033_fantastic_marvel_boy.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE IF NOT EXISTS "comfyui_deploy"."user_usage" ( - "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, - "user_id" text NOT NULL, - "usage_time" real DEFAULT 0 NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - "updated_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "comfyui_deploy"."user_usage" ADD CONSTRAINT "user_usage_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "comfyui_deploy"."users"("id") ON DELETE cascade ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/web/drizzle/0034_previous_viper.sql b/web/drizzle/0034_previous_viper.sql deleted file mode 100644 index 5953e59..0000000 --- a/web/drizzle/0034_previous_viper.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "comfyui_deploy"."user_usage" RENAME COLUMN "updated_at" TO "ended_at";--> statement-breakpoint -ALTER TABLE "comfyui_deploy"."user_usage" ADD COLUMN "org_id" text; \ No newline at end of file diff --git a/web/drizzle/meta/0033_snapshot.json b/web/drizzle/meta/0033_snapshot.json deleted file mode 100644 index 2c75c2a..0000000 --- a/web/drizzle/meta/0033_snapshot.json +++ /dev/null @@ -1,834 +0,0 @@ -{ - "id": "91bb0461-452a-4e59-abf4-8757fcd75a89", - "prevId": "1425ee00-66fb-4541-8da7-19b217944545", - "version": "5", - "dialect": "pg", - "tables": { - "api_keys": { - "name": "api_keys", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "key": { - "name": "key", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "org_id": { - "name": "org_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "revoked": { - "name": "revoked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": { - "api_keys_user_id_users_id_fk": { - "name": "api_keys_user_id_users_id_fk", - "tableFrom": "api_keys", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "api_keys_key_unique": { - "name": "api_keys_key_unique", - "nullsNotDistinct": false, - "columns": [ - "key" - ] - } - } - }, - "deployments": { - "name": "deployments", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "org_id": { - "name": "org_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "workflow_version_id": { - "name": "workflow_version_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "workflow_id": { - "name": "workflow_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "machine_id": { - "name": "machine_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "share_slug": { - "name": "share_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "showcase_media": { - "name": "showcase_media", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "environment": { - "name": "environment", - "type": "deployment_environment", - "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": { - "deployments_user_id_users_id_fk": { - "name": "deployments_user_id_users_id_fk", - "tableFrom": "deployments", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "deployments_workflow_version_id_workflow_versions_id_fk": { - "name": "deployments_workflow_version_id_workflow_versions_id_fk", - "tableFrom": "deployments", - "tableTo": "workflow_versions", - "columnsFrom": [ - "workflow_version_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "deployments_workflow_id_workflows_id_fk": { - "name": "deployments_workflow_id_workflows_id_fk", - "tableFrom": "deployments", - "tableTo": "workflows", - "columnsFrom": [ - "workflow_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "deployments_machine_id_machines_id_fk": { - "name": "deployments_machine_id_machines_id_fk", - "tableFrom": "deployments", - "tableTo": "machines", - "columnsFrom": [ - "machine_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "deployments_share_slug_unique": { - "name": "deployments_share_slug_unique", - "nullsNotDistinct": false, - "columns": [ - "share_slug" - ] - } - } - }, - "machines": { - "name": "machines", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "org_id": { - "name": "org_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "endpoint": { - "name": "endpoint", - "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()" - }, - "disabled": { - "name": "disabled", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "auth_token": { - "name": "auth_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "type": { - "name": "type", - "type": "machine_type", - "primaryKey": false, - "notNull": true, - "default": "'classic'" - }, - "status": { - "name": "status", - "type": "machine_status", - "primaryKey": false, - "notNull": true, - "default": "'ready'" - }, - "snapshot": { - "name": "snapshot", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "gpu": { - "name": "gpu", - "type": "machine_gpu", - "primaryKey": false, - "notNull": false - }, - "build_machine_instance_id": { - "name": "build_machine_instance_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "build_log": { - "name": "build_log", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "machines_user_id_users_id_fk": { - "name": "machines_user_id_users_id_fk", - "tableFrom": "machines", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "user_usage": { - "name": "user_usage", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "usage_time": { - "name": "usage_time", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "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": { - "user_usage_user_id_users_id_fk": { - "name": "user_usage_user_id_users_id_fk", - "tableFrom": "user_usage", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "workflow_run_outputs": { - "name": "workflow_run_outputs", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "run_id": { - "name": "run_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "jsonb", - "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": { - "workflow_run_outputs_run_id_workflow_runs_id_fk": { - "name": "workflow_run_outputs_run_id_workflow_runs_id_fk", - "tableFrom": "workflow_run_outputs", - "tableTo": "workflow_runs", - "columnsFrom": [ - "run_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "workflow_runs": { - "name": "workflow_runs", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "workflow_version_id": { - "name": "workflow_version_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "workflow_inputs": { - "name": "workflow_inputs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "workflow_id": { - "name": "workflow_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "machine_id": { - "name": "machine_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "origin": { - "name": "origin", - "type": "workflow_run_origin", - "primaryKey": false, - "notNull": true, - "default": "'api'" - }, - "status": { - "name": "status", - "type": "workflow_run_status", - "primaryKey": false, - "notNull": true, - "default": "'not-started'" - }, - "ended_at": { - "name": "ended_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "started_at": { - "name": "started_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "workflow_runs_workflow_version_id_workflow_versions_id_fk": { - "name": "workflow_runs_workflow_version_id_workflow_versions_id_fk", - "tableFrom": "workflow_runs", - "tableTo": "workflow_versions", - "columnsFrom": [ - "workflow_version_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "workflow_runs_workflow_id_workflows_id_fk": { - "name": "workflow_runs_workflow_id_workflows_id_fk", - "tableFrom": "workflow_runs", - "tableTo": "workflows", - "columnsFrom": [ - "workflow_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "workflow_runs_machine_id_machines_id_fk": { - "name": "workflow_runs_machine_id_machines_id_fk", - "tableFrom": "workflow_runs", - "tableTo": "machines", - "columnsFrom": [ - "machine_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "workflows": { - "name": "workflows", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "org_id": { - "name": "org_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "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": { - "workflows_user_id_users_id_fk": { - "name": "workflows_user_id_users_id_fk", - "tableFrom": "workflows", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "workflow_versions": { - "name": "workflow_versions", - "schema": "comfyui_deploy", - "columns": { - "workflow_id": { - "name": "workflow_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "workflow": { - "name": "workflow", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "workflow_api": { - "name": "workflow_api", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "version": { - "name": "version", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "snapshot": { - "name": "snapshot", - "type": "jsonb", - "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": { - "workflow_versions_workflow_id_workflows_id_fk": { - "name": "workflow_versions_workflow_id_workflows_id_fk", - "tableFrom": "workflow_versions", - "tableTo": "workflows", - "columnsFrom": [ - "workflow_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "deployment_environment": { - "name": "deployment_environment", - "values": { - "staging": "staging", - "production": "production", - "public-share": "public-share" - } - }, - "machine_gpu": { - "name": "machine_gpu", - "values": { - "T4": "T4", - "A10G": "A10G", - "A100": "A100" - } - }, - "machine_status": { - "name": "machine_status", - "values": { - "ready": "ready", - "building": "building", - "error": "error" - } - }, - "machine_type": { - "name": "machine_type", - "values": { - "classic": "classic", - "runpod-serverless": "runpod-serverless", - "modal-serverless": "modal-serverless", - "comfy-deploy-serverless": "comfy-deploy-serverless" - } - }, - "workflow_run_origin": { - "name": "workflow_run_origin", - "values": { - "manual": "manual", - "api": "api", - "public-share": "public-share" - } - }, - "workflow_run_status": { - "name": "workflow_run_status", - "values": { - "not-started": "not-started", - "running": "running", - "uploading": "uploading", - "success": "success", - "failed": "failed" - } - } - }, - "schemas": { - "comfyui_deploy": "comfyui_deploy" - }, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/web/drizzle/meta/0034_snapshot.json b/web/drizzle/meta/0034_snapshot.json deleted file mode 100644 index de5f69b..0000000 --- a/web/drizzle/meta/0034_snapshot.json +++ /dev/null @@ -1,842 +0,0 @@ -{ - "id": "fad17dc9-86c5-4081-8e73-47c113f48936", - "prevId": "91bb0461-452a-4e59-abf4-8757fcd75a89", - "version": "5", - "dialect": "pg", - "tables": { - "api_keys": { - "name": "api_keys", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "key": { - "name": "key", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "org_id": { - "name": "org_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "revoked": { - "name": "revoked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": { - "api_keys_user_id_users_id_fk": { - "name": "api_keys_user_id_users_id_fk", - "tableFrom": "api_keys", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "api_keys_key_unique": { - "name": "api_keys_key_unique", - "nullsNotDistinct": false, - "columns": [ - "key" - ] - } - } - }, - "deployments": { - "name": "deployments", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "org_id": { - "name": "org_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "workflow_version_id": { - "name": "workflow_version_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "workflow_id": { - "name": "workflow_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "machine_id": { - "name": "machine_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "share_slug": { - "name": "share_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "showcase_media": { - "name": "showcase_media", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "environment": { - "name": "environment", - "type": "deployment_environment", - "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": { - "deployments_user_id_users_id_fk": { - "name": "deployments_user_id_users_id_fk", - "tableFrom": "deployments", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "deployments_workflow_version_id_workflow_versions_id_fk": { - "name": "deployments_workflow_version_id_workflow_versions_id_fk", - "tableFrom": "deployments", - "tableTo": "workflow_versions", - "columnsFrom": [ - "workflow_version_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "deployments_workflow_id_workflows_id_fk": { - "name": "deployments_workflow_id_workflows_id_fk", - "tableFrom": "deployments", - "tableTo": "workflows", - "columnsFrom": [ - "workflow_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "deployments_machine_id_machines_id_fk": { - "name": "deployments_machine_id_machines_id_fk", - "tableFrom": "deployments", - "tableTo": "machines", - "columnsFrom": [ - "machine_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "deployments_share_slug_unique": { - "name": "deployments_share_slug_unique", - "nullsNotDistinct": false, - "columns": [ - "share_slug" - ] - } - } - }, - "machines": { - "name": "machines", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "org_id": { - "name": "org_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "endpoint": { - "name": "endpoint", - "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()" - }, - "disabled": { - "name": "disabled", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "auth_token": { - "name": "auth_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "type": { - "name": "type", - "type": "machine_type", - "primaryKey": false, - "notNull": true, - "default": "'classic'" - }, - "status": { - "name": "status", - "type": "machine_status", - "primaryKey": false, - "notNull": true, - "default": "'ready'" - }, - "snapshot": { - "name": "snapshot", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "gpu": { - "name": "gpu", - "type": "machine_gpu", - "primaryKey": false, - "notNull": false - }, - "build_machine_instance_id": { - "name": "build_machine_instance_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "build_log": { - "name": "build_log", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "machines_user_id_users_id_fk": { - "name": "machines_user_id_users_id_fk", - "tableFrom": "machines", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "user_usage": { - "name": "user_usage", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "org_id": { - "name": "org_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "usage_time": { - "name": "usage_time", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ended_at": { - "name": "ended_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "user_usage_user_id_users_id_fk": { - "name": "user_usage_user_id_users_id_fk", - "tableFrom": "user_usage", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "workflow_run_outputs": { - "name": "workflow_run_outputs", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "run_id": { - "name": "run_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "jsonb", - "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": { - "workflow_run_outputs_run_id_workflow_runs_id_fk": { - "name": "workflow_run_outputs_run_id_workflow_runs_id_fk", - "tableFrom": "workflow_run_outputs", - "tableTo": "workflow_runs", - "columnsFrom": [ - "run_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "workflow_runs": { - "name": "workflow_runs", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "workflow_version_id": { - "name": "workflow_version_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "workflow_inputs": { - "name": "workflow_inputs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "workflow_id": { - "name": "workflow_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "machine_id": { - "name": "machine_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "origin": { - "name": "origin", - "type": "workflow_run_origin", - "primaryKey": false, - "notNull": true, - "default": "'api'" - }, - "status": { - "name": "status", - "type": "workflow_run_status", - "primaryKey": false, - "notNull": true, - "default": "'not-started'" - }, - "ended_at": { - "name": "ended_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "started_at": { - "name": "started_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "workflow_runs_workflow_version_id_workflow_versions_id_fk": { - "name": "workflow_runs_workflow_version_id_workflow_versions_id_fk", - "tableFrom": "workflow_runs", - "tableTo": "workflow_versions", - "columnsFrom": [ - "workflow_version_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "workflow_runs_workflow_id_workflows_id_fk": { - "name": "workflow_runs_workflow_id_workflows_id_fk", - "tableFrom": "workflow_runs", - "tableTo": "workflows", - "columnsFrom": [ - "workflow_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "workflow_runs_machine_id_machines_id_fk": { - "name": "workflow_runs_machine_id_machines_id_fk", - "tableFrom": "workflow_runs", - "tableTo": "machines", - "columnsFrom": [ - "machine_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "workflows": { - "name": "workflows", - "schema": "comfyui_deploy", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "org_id": { - "name": "org_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "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": { - "workflows_user_id_users_id_fk": { - "name": "workflows_user_id_users_id_fk", - "tableFrom": "workflows", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "workflow_versions": { - "name": "workflow_versions", - "schema": "comfyui_deploy", - "columns": { - "workflow_id": { - "name": "workflow_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "workflow": { - "name": "workflow", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "workflow_api": { - "name": "workflow_api", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "version": { - "name": "version", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "snapshot": { - "name": "snapshot", - "type": "jsonb", - "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": { - "workflow_versions_workflow_id_workflows_id_fk": { - "name": "workflow_versions_workflow_id_workflows_id_fk", - "tableFrom": "workflow_versions", - "tableTo": "workflows", - "columnsFrom": [ - "workflow_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "deployment_environment": { - "name": "deployment_environment", - "values": { - "staging": "staging", - "production": "production", - "public-share": "public-share" - } - }, - "machine_gpu": { - "name": "machine_gpu", - "values": { - "T4": "T4", - "A10G": "A10G", - "A100": "A100" - } - }, - "machine_status": { - "name": "machine_status", - "values": { - "ready": "ready", - "building": "building", - "error": "error" - } - }, - "machine_type": { - "name": "machine_type", - "values": { - "classic": "classic", - "runpod-serverless": "runpod-serverless", - "modal-serverless": "modal-serverless", - "comfy-deploy-serverless": "comfy-deploy-serverless" - } - }, - "workflow_run_origin": { - "name": "workflow_run_origin", - "values": { - "manual": "manual", - "api": "api", - "public-share": "public-share" - } - }, - "workflow_run_status": { - "name": "workflow_run_status", - "values": { - "not-started": "not-started", - "running": "running", - "uploading": "uploading", - "success": "success", - "failed": "failed" - } - } - }, - "schemas": { - "comfyui_deploy": "comfyui_deploy" - }, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": { - "\"comfyui_deploy\".\"user_usage\".\"updated_at\"": "\"comfyui_deploy\".\"user_usage\".\"ended_at\"" - } - } -} \ No newline at end of file diff --git a/web/drizzle/meta/_journal.json b/web/drizzle/meta/_journal.json index abc42ef..d028999 100644 --- a/web/drizzle/meta/_journal.json +++ b/web/drizzle/meta/_journal.json @@ -1,251 +1 @@ -{ - "version": "5", - "dialect": "pg", - "entries": [ - { - "idx": 0, - "version": "5", - "when": 1702033790765, - "tag": "0000_quiet_ulik", - "breakpoints": true - }, - { - "idx": 1, - "version": "5", - "when": 1702034015507, - "tag": "0001_silly_arachne", - "breakpoints": true - }, - { - "idx": 2, - "version": "5", - "when": 1702044546478, - "tag": "0002_clean_khan", - "breakpoints": true - }, - { - "idx": 3, - "version": "5", - "when": 1702212969930, - "tag": "0003_oval_mockingbird", - "breakpoints": true - }, - { - "idx": 4, - "version": "5", - "when": 1702357291227, - "tag": "0004_zippy_freak", - "breakpoints": true - }, - { - "idx": 5, - "version": "5", - "when": 1702545286004, - "tag": "0005_worthless_dakota_north", - "breakpoints": true - }, - { - "idx": 6, - "version": "5", - "when": 1702556119574, - "tag": "0006_chief_mariko_yashida", - "breakpoints": true - }, - { - "idx": 7, - "version": "5", - "when": 1702609665746, - "tag": "0007_thin_greymalkin", - "breakpoints": true - }, - { - "idx": 8, - "version": "5", - "when": 1702615888467, - "tag": "0008_futuristic_adam_destine", - "breakpoints": true - }, - { - "idx": 9, - "version": "5", - "when": 1702632471725, - "tag": "0009_easy_banshee", - "breakpoints": true - }, - { - "idx": 10, - "version": "5", - "when": 1702708886828, - "tag": "0010_organic_marten_broadcloak", - "breakpoints": true - }, - { - "idx": 11, - "version": "5", - "when": 1702960221042, - "tag": "0011_peaceful_william_stryker", - "breakpoints": true - }, - { - "idx": 12, - "version": "5", - "when": 1703136669370, - "tag": "0012_exotic_sumo", - "breakpoints": true - }, - { - "idx": 13, - "version": "5", - "when": 1703338425429, - "tag": "0013_stormy_starbolt", - "breakpoints": true - }, - { - "idx": 14, - "version": "5", - "when": 1703403388113, - "tag": "0014_short_sunfire", - "breakpoints": true - }, - { - "idx": 15, - "version": "5", - "when": 1703409502387, - "tag": "0015_simple_killmonger", - "breakpoints": true - }, - { - "idx": 16, - "version": "5", - "when": 1704092053001, - "tag": "0016_overrated_cable", - "breakpoints": true - }, - { - "idx": 17, - "version": "5", - "when": 1704126972289, - "tag": "0017_tiresome_zaladane", - "breakpoints": true - }, - { - "idx": 18, - "version": "5", - "when": 1704129070951, - "tag": "0018_remarkable_the_leader", - "breakpoints": true - }, - { - "idx": 19, - "version": "5", - "when": 1704174903117, - "tag": "0019_damp_stick", - "breakpoints": true - }, - { - "idx": 20, - "version": "5", - "when": 1704350033885, - "tag": "0020_complete_black_tom", - "breakpoints": true - }, - { - "idx": 21, - "version": "5", - "when": 1704380757696, - "tag": "0021_aromatic_sabra", - "breakpoints": true - }, - { - "idx": 22, - "version": "5", - "when": 1704453649633, - "tag": "0022_petite_bishop", - "breakpoints": true - }, - { - "idx": 23, - "version": "5", - "when": 1704540132567, - "tag": "0023_fair_ikaris", - "breakpoints": true - }, - { - "idx": 24, - "version": "5", - "when": 1704632758591, - "tag": "0024_smiling_triton", - "breakpoints": true - }, - { - "idx": 25, - "version": "5", - "when": 1704640269305, - "tag": "0025_hard_jean_grey", - "breakpoints": true - }, - { - "idx": 26, - "version": "5", - "when": 1704979846175, - "tag": "0026_premium_rocket_raccoon", - "breakpoints": true - }, - { - "idx": 27, - "version": "5", - "when": 1705228261543, - "tag": "0027_eminent_lilith", - "breakpoints": true - }, - { - "idx": 28, - "version": "5", - "when": 1705642345817, - "tag": "0028_futuristic_lady_deathstrike", - "breakpoints": true - }, - { - "idx": 29, - "version": "5", - "when": 1705662714161, - "tag": "0029_large_frightful_four", - "breakpoints": true - }, - { - "idx": 30, - "version": "5", - "when": 1705716303820, - "tag": "0030_kind_doorman", - "breakpoints": true - }, - { - "idx": 31, - "version": "5", - "when": 1705763980972, - "tag": "0031_fast_lyja", - "breakpoints": true - }, - { - "idx": 32, - "version": "5", - "when": 1705806921697, - "tag": "0032_shallow_vermin", - "breakpoints": true - }, - { - "idx": 33, - "version": "5", - "when": 1705824362978, - "tag": "0033_fantastic_marvel_boy", - "breakpoints": true - }, - { - "idx": 34, - "version": "5", - "when": 1705840184127, - "tag": "0034_previous_viper", - "breakpoints": true - } - ] -} \ No newline at end of file +{"version":"5","dialect":"pg","entries":[{"idx":0,"version":"5","when":1702033790765,"tag":"0000_quiet_ulik","breakpoints":true},{"idx":1,"version":"5","when":1702034015507,"tag":"0001_silly_arachne","breakpoints":true},{"idx":2,"version":"5","when":1702044546478,"tag":"0002_clean_khan","breakpoints":true},{"idx":3,"version":"5","when":1702212969930,"tag":"0003_oval_mockingbird","breakpoints":true},{"idx":4,"version":"5","when":1702357291227,"tag":"0004_zippy_freak","breakpoints":true},{"idx":5,"version":"5","when":1702545286004,"tag":"0005_worthless_dakota_north","breakpoints":true},{"idx":6,"version":"5","when":1702556119574,"tag":"0006_chief_mariko_yashida","breakpoints":true},{"idx":7,"version":"5","when":1702609665746,"tag":"0007_thin_greymalkin","breakpoints":true},{"idx":8,"version":"5","when":1702615888467,"tag":"0008_futuristic_adam_destine","breakpoints":true},{"idx":9,"version":"5","when":1702632471725,"tag":"0009_easy_banshee","breakpoints":true},{"idx":10,"version":"5","when":1702708886828,"tag":"0010_organic_marten_broadcloak","breakpoints":true},{"idx":11,"version":"5","when":1702960221042,"tag":"0011_peaceful_william_stryker","breakpoints":true},{"idx":12,"version":"5","when":1703136669370,"tag":"0012_exotic_sumo","breakpoints":true},{"idx":13,"version":"5","when":1703338425429,"tag":"0013_stormy_starbolt","breakpoints":true},{"idx":14,"version":"5","when":1703403388113,"tag":"0014_short_sunfire","breakpoints":true},{"idx":15,"version":"5","when":1703409502387,"tag":"0015_simple_killmonger","breakpoints":true},{"idx":16,"version":"5","when":1704092053001,"tag":"0016_overrated_cable","breakpoints":true},{"idx":17,"version":"5","when":1704126972289,"tag":"0017_tiresome_zaladane","breakpoints":true},{"idx":18,"version":"5","when":1704129070951,"tag":"0018_remarkable_the_leader","breakpoints":true},{"idx":19,"version":"5","when":1704174903117,"tag":"0019_damp_stick","breakpoints":true},{"idx":20,"version":"5","when":1704350033885,"tag":"0020_complete_black_tom","breakpoints":true},{"idx":21,"version":"5","when":1704380757696,"tag":"0021_aromatic_sabra","breakpoints":true},{"idx":22,"version":"5","when":1704453649633,"tag":"0022_petite_bishop","breakpoints":true},{"idx":23,"version":"5","when":1704540132567,"tag":"0023_fair_ikaris","breakpoints":true},{"idx":24,"version":"5","when":1704632758591,"tag":"0024_smiling_triton","breakpoints":true},{"idx":25,"version":"5","when":1704640269305,"tag":"0025_hard_jean_grey","breakpoints":true},{"idx":26,"version":"5","when":1704979846175,"tag":"0026_premium_rocket_raccoon","breakpoints":true},{"idx":27,"version":"5","when":1705228261543,"tag":"0027_eminent_lilith","breakpoints":true},{"idx":28,"version":"5","when":1705642345817,"tag":"0028_futuristic_lady_deathstrike","breakpoints":true},{"idx":29,"version":"5","when":1705662714161,"tag":"0029_large_frightful_four","breakpoints":true},{"idx":30,"version":"5","when":1705716303820,"tag":"0030_kind_doorman","breakpoints":true},{"idx":31,"version":"5","when":1705763980972,"tag":"0031_fast_lyja","breakpoints":true},{"idx":32,"version":"5","when":1705806921697,"tag":"0032_shallow_vermin","breakpoints":true}]} \ No newline at end of file