{ "id": "7c979ba8-a696-484d-b97a-9ddabe5c9aec", "prevId": "c1d089d5-904c-4404-8f43-d270d0bc42e6", "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": { "account_userId_idx": { "name": "account_userId_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "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.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": { "session_userId_idx": { "name": "session_userId_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "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": { "verification_identifier_idx": { "name": "verification_identifier_idx", "columns": [ { "expression": "identifier", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.avatar_model": { "name": "avatar_model", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "character_id": { "name": "character_id", "type": "text", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": true }, "config": { "name": "config", "type": "jsonb", "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()" }, "deleted_at": { "name": "deleted_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "avatar_model_character_id_characters_id_fk": { "name": "avatar_model_character_id_characters_id_fk", "tableFrom": "avatar_model", "tableTo": "characters", "columnsFrom": [ "character_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.characters": { "name": "characters", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "version": { "name": "version", "type": "text", "primaryKey": false, "notNull": true }, "cover_url": { "name": "cover_url", "type": "text", "primaryKey": false, "notNull": true }, "creator_id": { "name": "creator_id", "type": "text", "primaryKey": false, "notNull": true }, "owner_id": { "name": "owner_id", "type": "text", "primaryKey": false, "notNull": true }, "character_id": { "name": "character_id", "type": "text", "primaryKey": false, "notNull": true }, "avatar_url": { "name": "avatar_url", "type": "text", "primaryKey": false, "notNull": false }, "creator_role": { "name": "creator_role", "type": "text", "primaryKey": false, "notNull": false }, "price_credit": { "name": "price_credit", "type": "text", "primaryKey": false, "notNull": true, "default": "'0'" }, "likes_count": { "name": "likes_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "bookmarks_count": { "name": "bookmarks_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "interactions_count": { "name": "interactions_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "forks_count": { "name": "forks_count", "type": "integer", "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()" }, "deleted_at": { "name": "deleted_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "characters_creator_id_user_id_fk": { "name": "characters_creator_id_user_id_fk", "tableFrom": "characters", "tableTo": "user", "columnsFrom": [ "creator_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "characters_owner_id_user_id_fk": { "name": "characters_owner_id_user_id_fk", "tableFrom": "characters", "tableTo": "user", "columnsFrom": [ "owner_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.character_capabilities": { "name": "character_capabilities", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "character_id": { "name": "character_id", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "config": { "name": "config", "type": "jsonb", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "character_capabilities_character_id_characters_id_fk": { "name": "character_capabilities_character_id_characters_id_fk", "tableFrom": "character_capabilities", "tableTo": "characters", "columnsFrom": [ "character_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.character_covers": { "name": "character_covers", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "character_id": { "name": "character_id", "type": "text", "primaryKey": false, "notNull": true }, "foreground_url": { "name": "foreground_url", "type": "text", "primaryKey": false, "notNull": true }, "background_url": { "name": "background_url", "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()" }, "deleted_at": { "name": "deleted_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "character_covers_character_id_characters_id_fk": { "name": "character_covers_character_id_characters_id_fk", "tableFrom": "character_covers", "tableTo": "characters", "columnsFrom": [ "character_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.character_i18n": { "name": "character_i18n", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "character_id": { "name": "character_id", "type": "text", "primaryKey": false, "notNull": true }, "language": { "name": "language", "type": "text", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "tagline": { "name": "tagline", "type": "text", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": true }, "tags": { "name": "tags", "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()" }, "deleted_at": { "name": "deleted_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "character_i18n_character_id_characters_id_fk": { "name": "character_i18n_character_id_characters_id_fk", "tableFrom": "character_i18n", "tableTo": "characters", "columnsFrom": [ "character_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.character_prompts": { "name": "character_prompts", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "character_id": { "name": "character_id", "type": "text", "primaryKey": false, "notNull": true }, "language": { "name": "language", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "character_prompts_character_id_characters_id_fk": { "name": "character_prompts_character_id_characters_id_fk", "tableFrom": "character_prompts", "tableTo": "characters", "columnsFrom": [ "character_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.chat_members": { "name": "chat_members", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "chat_id": { "name": "chat_id", "type": "text", "primaryKey": false, "notNull": true }, "member_type": { "name": "member_type", "type": "text", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": false }, "character_id": { "name": "character_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "chat_members_chat_id_chats_id_fk": { "name": "chat_members_chat_id_chats_id_fk", "tableFrom": "chat_members", "tableTo": "chats", "columnsFrom": [ "chat_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.chats": { "name": "chats", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "title": { "name": "title", "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()" }, "deleted_at": { "name": "deleted_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.media": { "name": "media", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "url": { "name": "url", "type": "text", "primaryKey": false, "notNull": true }, "mime_type": { "name": "mime_type", "type": "text", "primaryKey": false, "notNull": true }, "size": { "name": "size", "type": "integer", "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 }, "public.messages": { "name": "messages", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "chat_id": { "name": "chat_id", "type": "text", "primaryKey": false, "notNull": true }, "sender_id": { "name": "sender_id", "type": "text", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "text", "primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true }, "media_ids": { "name": "media_ids", "type": "text[]", "primaryKey": false, "notNull": true }, "sticker_ids": { "name": "sticker_ids", "type": "text[]", "primaryKey": false, "notNull": true }, "reply_message_id": { "name": "reply_message_id", "type": "text", "primaryKey": false, "notNull": false }, "forward_from_message_id": { "name": "forward_from_message_id", "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()" }, "deleted_at": { "name": "deleted_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "messages_chat_id_chats_id_fk": { "name": "messages_chat_id_chats_id_fk", "tableFrom": "messages", "tableTo": "chats", "columnsFrom": [ "chat_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.sticker_packs": { "name": "sticker_packs", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "description": { "name": "description", "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": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.stickers": { "name": "stickers", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "url": { "name": "url", "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": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_flux": { "name": "user_flux", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "text", "primaryKey": true, "notNull": true }, "flux": { "name": "flux", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": false }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_flux_user_id_user_id_fk": { "name": "user_flux_user_id_user_id_fk", "tableFrom": "user_flux", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.llm_request_log": { "name": "llm_request_log", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "model": { "name": "model", "type": "text", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "integer", "primaryKey": false, "notNull": true }, "duration_ms": { "name": "duration_ms", "type": "integer", "primaryKey": false, "notNull": true }, "flux_consumed": { "name": "flux_consumed", "type": "integer", "primaryKey": false, "notNull": true }, "prompt_tokens": { "name": "prompt_tokens", "type": "integer", "primaryKey": false, "notNull": false }, "completion_tokens": { "name": "completion_tokens", "type": "integer", "primaryKey": false, "notNull": false }, "settled": { "name": "settled", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "llm_request_log_user_id_user_id_fk": { "name": "llm_request_log_user_id_user_id_fk", "tableFrom": "llm_request_log", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.system_provider_configs": { "name": "system_provider_configs", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "definition_id": { "name": "definition_id", "type": "text", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "config": { "name": "config", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "validated": { "name": "validated", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "validation_bypassed": { "name": "validation_bypassed", "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()" }, "deleted_at": { "name": "deleted_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_provider_configs": { "name": "user_provider_configs", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "owner_id": { "name": "owner_id", "type": "text", "primaryKey": false, "notNull": true }, "definition_id": { "name": "definition_id", "type": "text", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "config": { "name": "config", "type": "jsonb", "primaryKey": false, "notNull": true, "default": "'{}'::jsonb" }, "validated": { "name": "validated", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "validation_bypassed": { "name": "validation_bypassed", "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()" }, "deleted_at": { "name": "deleted_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "user_provider_configs_owner_id_user_id_fk": { "name": "user_provider_configs_owner_id_user_id_fk", "tableFrom": "user_provider_configs", "tableTo": "user", "columnsFrom": [ "owner_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.stripe_checkout_session": { "name": "stripe_checkout_session", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_session_id": { "name": "stripe_session_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": false }, "mode": { "name": "mode", "type": "text", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": false }, "payment_status": { "name": "payment_status", "type": "text", "primaryKey": false, "notNull": false }, "amount_total": { "name": "amount_total", "type": "integer", "primaryKey": false, "notNull": false }, "currency": { "name": "currency", "type": "text", "primaryKey": false, "notNull": false }, "success_url": { "name": "success_url", "type": "text", "primaryKey": false, "notNull": false }, "cancel_url": { "name": "cancel_url", "type": "text", "primaryKey": false, "notNull": false }, "stripe_payment_intent_id": { "name": "stripe_payment_intent_id", "type": "text", "primaryKey": false, "notNull": false }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": false }, "metadata": { "name": "metadata", "type": "text", "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, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "stripe_checkout_session_user_id_user_id_fk": { "name": "stripe_checkout_session_user_id_user_id_fk", "tableFrom": "stripe_checkout_session", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "stripe_checkout_session_stripe_session_id_unique": { "name": "stripe_checkout_session_stripe_session_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_session_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.stripe_customer": { "name": "stripe_customer", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "name": { "name": "name", "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": { "stripe_customer_user_id_user_id_fk": { "name": "stripe_customer_user_id_user_id_fk", "tableFrom": "stripe_customer", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "stripe_customer_stripe_customer_id_unique": { "name": "stripe_customer_stripe_customer_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_customer_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.stripe_invoice": { "name": "stripe_invoice", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_invoice_id": { "name": "stripe_invoice_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": false }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": false }, "amount_due": { "name": "amount_due", "type": "integer", "primaryKey": false, "notNull": false }, "amount_paid": { "name": "amount_paid", "type": "integer", "primaryKey": false, "notNull": false }, "currency": { "name": "currency", "type": "text", "primaryKey": false, "notNull": false }, "invoice_url": { "name": "invoice_url", "type": "text", "primaryKey": false, "notNull": false }, "invoice_pdf": { "name": "invoice_pdf", "type": "text", "primaryKey": false, "notNull": false }, "period_start": { "name": "period_start", "type": "timestamp", "primaryKey": false, "notNull": false }, "period_end": { "name": "period_end", "type": "timestamp", "primaryKey": false, "notNull": false }, "paid_at": { "name": "paid_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "metadata": { "name": "metadata", "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": { "stripe_invoice_user_id_user_id_fk": { "name": "stripe_invoice_user_id_user_id_fk", "tableFrom": "stripe_invoice", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "stripe_invoice_stripe_invoice_id_unique": { "name": "stripe_invoice_stripe_invoice_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_invoice_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.stripe_subscription": { "name": "stripe_subscription", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_subscription_id": { "name": "stripe_subscription_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_customer_id": { "name": "stripe_customer_id", "type": "text", "primaryKey": false, "notNull": true }, "stripe_price_id": { "name": "stripe_price_id", "type": "text", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true }, "current_period_start": { "name": "current_period_start", "type": "timestamp", "primaryKey": false, "notNull": false }, "current_period_end": { "name": "current_period_end", "type": "timestamp", "primaryKey": false, "notNull": false }, "cancel_at_period_end": { "name": "cancel_at_period_end", "type": "text", "primaryKey": false, "notNull": false }, "canceled_at": { "name": "canceled_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "ended_at": { "name": "ended_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "metadata": { "name": "metadata", "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": { "stripe_subscription_user_id_user_id_fk": { "name": "stripe_subscription_user_id_user_id_fk", "tableFrom": "stripe_subscription", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "stripe_subscription_stripe_subscription_id_unique": { "name": "stripe_subscription_stripe_subscription_id_unique", "nullsNotDistinct": false, "columns": [ "stripe_subscription_id" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_character_bookmarks": { "name": "user_character_bookmarks", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "character_id": { "name": "character_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_character_bookmarks_user_id_user_id_fk": { "name": "user_character_bookmarks_user_id_user_id_fk", "tableFrom": "user_character_bookmarks", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "user_character_bookmarks_character_id_characters_id_fk": { "name": "user_character_bookmarks_character_id_characters_id_fk", "tableFrom": "user_character_bookmarks", "tableTo": "characters", "columnsFrom": [ "character_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "user_character_bookmarks_user_id_character_id_pk": { "name": "user_character_bookmarks_user_id_character_id_pk", "columns": [ "user_id", "character_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_character_likes": { "name": "user_character_likes", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "character_id": { "name": "character_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_character_likes_user_id_user_id_fk": { "name": "user_character_likes_user_id_user_id_fk", "tableFrom": "user_character_likes", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "user_character_likes_character_id_characters_id_fk": { "name": "user_character_likes_character_id_characters_id_fk", "tableFrom": "user_character_likes", "tableTo": "characters", "columnsFrom": [ "character_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "user_character_likes_user_id_character_id_pk": { "name": "user_character_likes_user_id_character_id_pk", "columns": [ "user_id", "character_id" ] } }, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": {}, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }