fix: resolve Byted RDS errors caused by missing table comments (#2382)
This commit is contained in:
5
docker/atlas/migrations/20251024091145_update.sql
Normal file
5
docker/atlas/migrations/20251024091145_update.sql
Normal file
@ -0,0 +1,5 @@
|
||||
-- Modify "app_static_conversation_draft" table
|
||||
ALTER TABLE `opencoze`.`app_static_conversation_draft` COMMENT "app_static_conversation_draft";
|
||||
-- Modify "app_static_conversation_online" table
|
||||
ALTER TABLE `opencoze`.`app_static_conversation_online` COMMENT "app_static_conversation_online";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
h1:UZoP+mSeNiF9zPDKHSSY7rlgmeipCGNRrwYdlEZ3Ens=
|
||||
h1:fRmZ1DqaVJmbdXGbkWkJGCWbHy3gTQxkg6KRhpDBYeA=
|
||||
20250703095335_initial.sql h1:/joaeUTMhXqAEc0KwsSve5+bYM0qPOp+9OizJtsRc+U=
|
||||
20250703115304_update.sql h1:cbYo6Q6Lh96hB4hu5KW2Nn/Mr0VDpg7a1WPgpIb1SOc=
|
||||
20250704040445_update.sql h1:QWmoPY//oQ+GFZwET9w/oAWa8mM0KVaD5G8Yiu9bMqY=
|
||||
@ -14,3 +14,4 @@ h1:UZoP+mSeNiF9zPDKHSSY7rlgmeipCGNRrwYdlEZ3Ens=
|
||||
20250822060516_update.sql h1:KoL8FPXw5/JMsJMtJsoGFIc4wYHlngBudeYSz5o4iKU=
|
||||
20251015103940_update.sql h1:ivE+qtF4q3bMFroid1yMSO465s5Oiey/5VvQ7GWnBlY=
|
||||
20251016034721_update.sql h1:BLXpKpa3LBVyiuMDGSwud6WwM+34jQQvn11ytYZCbrw=
|
||||
20251024091145_update.sql h1:WH/24vD2bYK6udS7GRO1Enzw81SjCpRcbOSkzUhiMrk=
|
||||
|
||||
@ -762,6 +762,7 @@ table "app_release_record" {
|
||||
}
|
||||
table "app_static_conversation_draft" {
|
||||
schema = schema.opencoze
|
||||
comment = "app_static_conversation_draft"
|
||||
column "id" {
|
||||
null = false
|
||||
type = bigint
|
||||
@ -812,6 +813,7 @@ table "app_static_conversation_draft" {
|
||||
}
|
||||
table "app_static_conversation_online" {
|
||||
schema = schema.opencoze
|
||||
comment = "app_static_conversation_online"
|
||||
column "id" {
|
||||
null = false
|
||||
type = bigint
|
||||
@ -1014,6 +1016,12 @@ table "conversation" {
|
||||
comment = "id"
|
||||
auto_increment = true
|
||||
}
|
||||
column "name" {
|
||||
null = true
|
||||
type = varchar(255)
|
||||
default = ""
|
||||
comment = "conversation name"
|
||||
}
|
||||
column "connector_id" {
|
||||
null = false
|
||||
type = bigint
|
||||
@ -1072,12 +1080,6 @@ table "conversation" {
|
||||
unsigned = true
|
||||
comment = "Update Time in Milliseconds"
|
||||
}
|
||||
column "name" {
|
||||
null = true
|
||||
type = varchar(255)
|
||||
default = ""
|
||||
comment = "conversation name"
|
||||
}
|
||||
primary_key {
|
||||
columns = [column.id]
|
||||
}
|
||||
@ -3254,11 +3256,6 @@ table "single_agent_draft" {
|
||||
type = json
|
||||
comment = "Agent Database Base Configuration"
|
||||
}
|
||||
column "shortcut_command" {
|
||||
null = true
|
||||
type = json
|
||||
comment = "shortcut command"
|
||||
}
|
||||
column "bot_mode" {
|
||||
null = false
|
||||
type = tinyint
|
||||
@ -3270,6 +3267,11 @@ table "single_agent_draft" {
|
||||
type = text
|
||||
comment = "chatflow layout info"
|
||||
}
|
||||
column "shortcut_command" {
|
||||
null = true
|
||||
type = json
|
||||
comment = "shortcut command"
|
||||
}
|
||||
primary_key {
|
||||
columns = [column.id]
|
||||
}
|
||||
@ -3426,6 +3428,17 @@ table "single_agent_version" {
|
||||
unsigned = true
|
||||
comment = "Create Time in Milliseconds"
|
||||
}
|
||||
column "bot_mode" {
|
||||
null = false
|
||||
type = tinyint
|
||||
default = 0
|
||||
comment = "bot mode,0:single mode 2:chatflow mode"
|
||||
}
|
||||
column "layout_info" {
|
||||
null = true
|
||||
type = text
|
||||
comment = "chatflow layout info"
|
||||
}
|
||||
column "updated_at" {
|
||||
null = false
|
||||
type = bigint
|
||||
@ -3510,17 +3523,6 @@ table "single_agent_version" {
|
||||
type = json
|
||||
comment = "shortcut command"
|
||||
}
|
||||
column "bot_mode" {
|
||||
null = false
|
||||
type = tinyint
|
||||
default = 0
|
||||
comment = "bot mode,0:single mode 2:chatflow mode"
|
||||
}
|
||||
column "layout_info" {
|
||||
null = true
|
||||
type = text
|
||||
comment = "chatflow layout info"
|
||||
}
|
||||
primary_key {
|
||||
columns = [column.id]
|
||||
}
|
||||
|
||||
@ -3,9 +3,9 @@ CREATE DATABASE IF NOT EXISTS opencoze COLLATE utf8mb4_unicode_ci;
|
||||
-- Create 'agent_to_database' table
|
||||
CREATE TABLE IF NOT EXISTS `agent_to_database` (`id` bigint unsigned NOT NULL COMMENT 'ID', `agent_id` bigint unsigned NOT NULL COMMENT 'Agent ID', `database_id` bigint unsigned NOT NULL COMMENT 'ID of database_info', `is_draft` bool NOT NULL COMMENT 'Is draft', `prompt_disable` bool NOT NULL DEFAULT 0 COMMENT 'Support prompt calls: 1 not supported, 0 supported', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_agent_db_draft` (`agent_id`, `database_id`, `is_draft`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'agent_to_database info';
|
||||
-- Create 'agent_tool_draft' table
|
||||
CREATE TABLE IF NOT EXISTS `agent_tool_draft` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Primary Key ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Agent ID', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Plugin ID', `tool_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Tool ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `sub_url` varchar(512) NOT NULL DEFAULT '' COMMENT 'Sub URL Path', `method` varchar(64) NOT NULL DEFAULT '' COMMENT 'HTTP Request Method', `tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Name', `tool_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Version, e.g. v1.0.0', `operation` json NULL COMMENT 'Tool Openapi Operation Schema', PRIMARY KEY (`id`), INDEX `idx_agent_plugin_tool` (`agent_id`, `plugin_id`, `tool_id`), INDEX `idx_agent_tool_bind` (`agent_id`, `created_at`), UNIQUE INDEX `uniq_idx_agent_tool_id` (`agent_id`, `tool_id`), UNIQUE INDEX `uniq_idx_agent_tool_name` (`agent_id`, `tool_name`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Draft Agent Tool';
|
||||
CREATE TABLE IF NOT EXISTS `agent_tool_draft` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Primary Key ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Agent ID', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Plugin ID', `tool_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Tool ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `sub_url` varchar(512) NOT NULL DEFAULT '' COMMENT 'Sub URL Path', `method` varchar(64) NOT NULL DEFAULT '' COMMENT 'HTTP Request Method', `tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Name', `tool_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Version, e.g. v1.0.0', `operation` json NULL COMMENT 'Tool Openapi Operation Schema', `source` tinyint NOT NULL DEFAULT 0 COMMENT 'tool source 1 coze saas 0 default', PRIMARY KEY (`id`), INDEX `idx_agent_plugin_tool` (`agent_id`, `plugin_id`, `tool_id`), INDEX `idx_agent_tool_bind` (`agent_id`, `created_at`), UNIQUE INDEX `uniq_idx_agent_tool_id` (`agent_id`, `tool_id`), UNIQUE INDEX `uniq_idx_agent_tool_name` (`agent_id`, `tool_name`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Draft Agent Tool';
|
||||
-- Create 'agent_tool_version' table
|
||||
CREATE TABLE IF NOT EXISTS `agent_tool_version` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Primary Key ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Agent ID', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Plugin ID', `tool_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Tool ID', `agent_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Tool Version', `tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Name', `tool_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Version, e.g. v1.0.0', `sub_url` varchar(512) NOT NULL DEFAULT '' COMMENT 'Sub URL Path', `method` varchar(64) NOT NULL DEFAULT '' COMMENT 'HTTP Request Method', `operation` json NULL COMMENT 'Tool Openapi Operation Schema', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', PRIMARY KEY (`id`), INDEX `idx_agent_tool_id_created_at` (`agent_id`, `tool_id`, `created_at`), INDEX `idx_agent_tool_name_created_at` (`agent_id`, `tool_name`, `created_at`), UNIQUE INDEX `uniq_idx_agent_tool_id_agent_version` (`agent_id`, `tool_id`, `agent_version`), UNIQUE INDEX `uniq_idx_agent_tool_name_agent_version` (`agent_id`, `tool_name`, `agent_version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Agent Tool Version';
|
||||
CREATE TABLE IF NOT EXISTS `agent_tool_version` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Primary Key ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Agent ID', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Plugin ID', `tool_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Tool ID', `agent_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Tool Version', `tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Name', `tool_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Version, e.g. v1.0.0', `sub_url` varchar(512) NOT NULL DEFAULT '' COMMENT 'Sub URL Path', `method` varchar(64) NOT NULL DEFAULT '' COMMENT 'HTTP Request Method', `operation` json NULL COMMENT 'Tool Openapi Operation Schema', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `source` tinyint NOT NULL DEFAULT 0 COMMENT 'tool source 1 coze saas 0 default', PRIMARY KEY (`id`), INDEX `idx_agent_tool_id_created_at` (`agent_id`, `tool_id`, `created_at`), INDEX `idx_agent_tool_name_created_at` (`agent_id`, `tool_name`, `created_at`), UNIQUE INDEX `uniq_idx_agent_tool_id_agent_version` (`agent_id`, `tool_id`, `agent_version`), UNIQUE INDEX `uniq_idx_agent_tool_name_agent_version` (`agent_id`, `tool_name`, `agent_version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Agent Tool Version';
|
||||
-- Create 'api_key' table
|
||||
CREATE TABLE IF NOT EXISTS `api_key` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID', `api_key` varchar(255) NOT NULL DEFAULT '' COMMENT 'API Key hash', `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'API Key Name', `status` tinyint NOT NULL DEFAULT 0 COMMENT '0 normal, 1 deleted', `user_id` bigint NOT NULL DEFAULT 0 COMMENT 'API Key Owner', `expired_at` bigint NOT NULL DEFAULT 0 COMMENT 'API Key Expired Time', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `last_used_at` bigint NOT NULL DEFAULT 0 COMMENT 'Used Time in Milliseconds', `ak_type` tinyint NOT NULL DEFAULT 0 COMMENT 'api key type ', PRIMARY KEY (`id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'api key table';
|
||||
-- Create 'app_connector_release_ref' table
|
||||
@ -23,15 +23,15 @@ CREATE TABLE IF NOT EXISTS `app_dynamic_conversation_online` (`id` bigint unsign
|
||||
-- Create 'app_release_record' table
|
||||
CREATE TABLE IF NOT EXISTS `app_release_record` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Publish Record ID', `app_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Application ID', `space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Space ID', `owner_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner ID', `icon_uri` varchar(512) NOT NULL DEFAULT '' COMMENT 'Icon URI', `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Application Name', `description` text NULL COMMENT 'Application Description', `connector_ids` json NULL COMMENT 'Publish Connector IDs', `extra_info` json NULL COMMENT 'Publish Extra Info', `version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Release Version', `version_desc` text NULL COMMENT 'Version Description', `publish_status` tinyint NOT NULL DEFAULT 0 COMMENT 'Publish Status', `publish_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Publish Time in Milliseconds', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', PRIMARY KEY (`id`), INDEX `idx_app_publish_at` (`app_id`, `publish_at`), UNIQUE INDEX `uniq_idx_app_version_connector` (`app_id`, `version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Application Release Record';
|
||||
-- Create 'app_static_conversation_draft' table
|
||||
CREATE TABLE IF NOT EXISTS `app_static_conversation_draft` (`id` bigint unsigned NOT NULL COMMENT 'id', `template_id` bigint unsigned NOT NULL COMMENT 'template id', `user_id` bigint unsigned NOT NULL COMMENT 'user id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `conversation_id` bigint unsigned NOT NULL COMMENT 'conversation id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
CREATE TABLE IF NOT EXISTS `app_static_conversation_draft` (`id` bigint unsigned NOT NULL COMMENT 'id', `template_id` bigint unsigned NOT NULL COMMENT 'template id', `user_id` bigint unsigned NOT NULL COMMENT 'user id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `conversation_id` bigint unsigned NOT NULL COMMENT 'conversation id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'app_static_conversation_draft';
|
||||
-- Create 'app_static_conversation_online' table
|
||||
CREATE TABLE IF NOT EXISTS `app_static_conversation_online` (`id` bigint unsigned NOT NULL COMMENT 'id', `template_id` bigint unsigned NOT NULL COMMENT 'template id', `user_id` bigint unsigned NOT NULL COMMENT 'user id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `conversation_id` bigint unsigned NOT NULL COMMENT 'conversation id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
CREATE TABLE IF NOT EXISTS `app_static_conversation_online` (`id` bigint unsigned NOT NULL COMMENT 'id', `template_id` bigint unsigned NOT NULL COMMENT 'template id', `user_id` bigint unsigned NOT NULL COMMENT 'user id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `conversation_id` bigint unsigned NOT NULL COMMENT 'conversation id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'app_static_conversation_online';
|
||||
-- Create 'chat_flow_role_config' table
|
||||
CREATE TABLE IF NOT EXISTS `chat_flow_role_config` (`id` bigint unsigned NOT NULL COMMENT 'id', `workflow_id` bigint unsigned NOT NULL COMMENT 'workflow id', `connector_id` bigint unsigned NULL COMMENT 'connector id', `name` varchar(256) NOT NULL COMMENT 'role name', `description` mediumtext NULL COMMENT 'role description', `version` varchar(256) NULL COMMENT 'version', `avatar` varchar(256) NOT NULL COMMENT 'avatar uri', `background_image_info` mediumtext NULL COMMENT 'background image information, object structure', `onboarding_info` mediumtext NULL COMMENT 'intro information, object structure', `suggest_reply_info` mediumtext NULL COMMENT 'user suggestions, object structure', `audio_config` mediumtext NULL COMMENT 'agent audio config, object structure', `user_input_config` varchar(256) NOT NULL COMMENT 'user input config, object structure', `creator_id` bigint unsigned NOT NULL COMMENT 'creator id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', `updated_at` bigint unsigned NULL COMMENT 'update time in millisecond', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_version` (`connector_id`, `version`), INDEX `idx_workflow_id_version` (`workflow_id`, `version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'chat_flow_role_config';
|
||||
-- Create 'connector_workflow_version' table
|
||||
CREATE TABLE IF NOT EXISTS `connector_workflow_version` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `app_id` bigint unsigned NOT NULL COMMENT 'app id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `workflow_id` bigint unsigned NOT NULL COMMENT 'workflow id', `version` varchar(256) NOT NULL COMMENT 'version', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_workflow_id_create_at` (`connector_id`, `workflow_id`, `created_at`), UNIQUE INDEX `uniq_connector_id_workflow_id_version` (`connector_id`, `workflow_id`, `version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'connector workflow version';
|
||||
-- Create 'conversation' table
|
||||
CREATE TABLE IF NOT EXISTS `conversation` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `name` varchar(255) NULL DEFAULT '' COMMENT 'conversation name', `connector_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Publish Connector ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'agent_id', `scene` tinyint NOT NULL DEFAULT 0 COMMENT 'conversation scene', `section_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'section_id', `creator_id` bigint unsigned NULL DEFAULT 0 COMMENT 'creator_id', `ext` text NULL COMMENT 'ext', `status` tinyint NOT NULL DEFAULT 1 COMMENT 'status: 1-normal 2-deleted', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', PRIMARY KEY (`id`), INDEX `idx_connector_bot_status` (`connector_id`, `agent_id`, `creator_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'conversation info record';
|
||||
CREATE TABLE IF NOT EXISTS `conversation` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `name` varchar(255) NULL DEFAULT '' COMMENT 'conversation name', `connector_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Publish Connector ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'agent_id', `scene` tinyint NOT NULL DEFAULT 0 COMMENT 'conversation scene', `section_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'section_id', `creator_id` bigint unsigned NULL DEFAULT 0 COMMENT 'creator_id', `ext` text NULL COMMENT 'ext', `status` tinyint NOT NULL DEFAULT 1 COMMENT 'status: 1-normal 2-deleted', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', PRIMARY KEY (`id`), INDEX `idx_connector_bot_status` (`connector_id`, `agent_id`, `creator_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'conversation info record' AUTO_INCREMENT 7563957783431741441;
|
||||
-- Create 'data_copy_task' table
|
||||
CREATE TABLE IF NOT EXISTS `data_copy_task` (`master_task_id` varchar(128) NULL DEFAULT '' COMMENT 'task id', `origin_data_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'origin data id', `target_data_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'target data id', `origin_space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'origin space id', `target_space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'target space id', `origin_user_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'origin user id', `target_user_id` bigint unsigned NULL DEFAULT 0 COMMENT 'target user id', `origin_app_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'origin app id', `target_app_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'target app id', `data_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'data type 1:knowledge, 2:database', `ext_info` varchar(255) NOT NULL DEFAULT '' COMMENT 'ext', `start_time` bigint NULL DEFAULT 0 COMMENT 'task start time', `finish_time` bigint NULL COMMENT 'task finish time', `status` tinyint NOT NULL DEFAULT 1 COMMENT '1: Create 2: Running 3: Success 4: Failure', `error_msg` varchar(128) NULL COMMENT 'error msg', `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_master_task_id_origin_data_id_data_type` (`master_task_id`, `origin_data_id`, `data_type`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'data copy task record';
|
||||
-- Create 'draft_database_info' table
|
||||
@ -73,7 +73,7 @@ CREATE TABLE IF NOT EXISTS `prompt_resource` (`id` bigint unsigned NOT NULL AUTO
|
||||
-- Create 'run_record' table
|
||||
CREATE TABLE IF NOT EXISTS `run_record` (`id` bigint unsigned NOT NULL COMMENT 'id', `conversation_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'conversation id', `section_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'section ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'agent_id', `user_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'user id', `source` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Execute source 0 API', `status` varchar(255) NOT NULL DEFAULT '' COMMENT 'status,0 Unknown, 1-Created,2-InProgress,3-Completed,4-Failed,5-Expired,6-Cancelled,7-RequiresAction', `creator_id` bigint NOT NULL DEFAULT 0 COMMENT 'creator id', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `failed_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Fail Time in Milliseconds', `last_error` text NULL COMMENT 'error message' COLLATE utf8mb4_general_ci, `completed_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Finish Time in Milliseconds', `chat_request` text NULL COMMENT 'Original request field' COLLATE utf8mb4_general_ci, `ext` text NULL COMMENT 'ext' COLLATE utf8mb4_general_ci, `usage` json NULL COMMENT 'usage', PRIMARY KEY (`id`), INDEX `idx_c_s` (`conversation_id`, `section_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'run record';
|
||||
-- Create 'shortcut_command' table
|
||||
CREATE TABLE IF NOT EXISTS `shortcut_command` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `object_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID, this command can be used for this entity', `command_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'command id', `command_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'command name', `shortcut_command` varchar(255) NOT NULL DEFAULT '' COMMENT 'shortcut command', `description` varchar(2000) NOT NULL DEFAULT '' COMMENT 'description', `send_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'send type 0:query 1:panel', `tool_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Type 1 of tool used: WorkFlow 2: Plugin', `work_flow_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'workflow id', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'plugin id', `plugin_tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'plugin tool name', `template_query` text NULL COMMENT 'template query', `components` json NULL COMMENT 'Panel parameters', `card_schema` text NULL COMMENT 'card schema', `tool_info` json NULL COMMENT 'Tool information includes name+variable list', `status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Status, 0 is invalid, 1 is valid', `creator_id` bigint unsigned NULL DEFAULT 0 COMMENT 'creator id', `is_online` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Is online information: 0 draft 1 online', `created_at` bigint NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'When executing a multi instruction, which node executes the instruction', `shortcut_icon` json NULL COMMENT 'shortcut icon', `plugin_tool_id` bigint NOT NULL DEFAULT 0 COMMENT 'tool_id', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_object_command_id_type` (`object_id`, `command_id`, `is_online`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'bot shortcut command table';
|
||||
CREATE TABLE IF NOT EXISTS `shortcut_command` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `object_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID, this command can be used for this entity', `command_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'command id', `command_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'command name', `shortcut_command` varchar(255) NOT NULL DEFAULT '' COMMENT 'shortcut command', `description` varchar(2000) NOT NULL DEFAULT '' COMMENT 'description', `send_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'send type 0:query 1:panel', `tool_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Type 1 of tool used: WorkFlow 2: Plugin', `work_flow_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'workflow id', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'plugin id', `plugin_tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'plugin tool name', `template_query` text NULL COMMENT 'template query', `components` json NULL COMMENT 'Panel parameters', `card_schema` text NULL COMMENT 'card schema', `tool_info` json NULL COMMENT 'Tool information includes name+variable list', `status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Status, 0 is invalid, 1 is valid', `creator_id` bigint unsigned NULL DEFAULT 0 COMMENT 'creator id', `is_online` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Is online information: 0 draft 1 online', `created_at` bigint NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'When executing a multi instruction, which node executes the instruction', `shortcut_icon` json NULL COMMENT 'shortcut icon', `plugin_tool_id` bigint NOT NULL DEFAULT 0 COMMENT 'tool_id', `source` tinyint NULL DEFAULT 0 COMMENT 'plugin source 1 coze saas 0 default', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_object_command_id_type` (`object_id`, `command_id`, `is_online`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'bot shortcut command table';
|
||||
-- Create 'single_agent_draft' table
|
||||
CREATE TABLE IF NOT EXISTS `single_agent_draft` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'Agent ID', `creator_id` bigint NOT NULL DEFAULT 0 COMMENT 'Creator ID', `space_id` bigint NOT NULL DEFAULT 0 COMMENT 'Space ID', `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Name', `description` text NULL COMMENT 'Agent Description', `icon_uri` varchar(255) NOT NULL DEFAULT '' COMMENT 'Icon URI', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', `variables_meta_id` bigint NULL COMMENT 'variables meta table ID', `model_info` json NULL COMMENT 'Model Configuration Information', `onboarding_info` json NULL COMMENT 'Onboarding Information', `prompt` json NULL COMMENT 'Agent Prompt Configuration', `plugin` json NULL COMMENT 'Agent Plugin Base Configuration', `knowledge` json NULL COMMENT 'Agent Knowledge Base Configuration', `workflow` json NULL COMMENT 'Agent Workflow Configuration', `suggest_reply` json NULL COMMENT 'Suggested Replies', `jump_config` json NULL COMMENT 'Jump Configuration', `background_image_info_list` json NULL COMMENT 'Background image', `database_config` json NULL COMMENT 'Agent Database Base Configuration', `bot_mode` tinyint NOT NULL DEFAULT 0 COMMENT 'bot mode,0:single mode 2:chatflow mode', `layout_info` text NULL COMMENT 'chatflow layout info', `shortcut_command` json NULL COMMENT 'shortcut command', PRIMARY KEY (`id`), INDEX `idx_creator_id` (`creator_id`), UNIQUE INDEX `uniq_agent_id` (`agent_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Single Agent Draft Copy Table';
|
||||
-- Create 'single_agent_publish' table
|
||||
@ -81,9 +81,9 @@ CREATE TABLE IF NOT EXISTS `single_agent_publish` (`id` bigint unsigned NOT NULL
|
||||
-- Create 'single_agent_version' table
|
||||
CREATE TABLE IF NOT EXISTS `single_agent_version` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'Agent ID', `creator_id` bigint NOT NULL DEFAULT 0 COMMENT 'Creator ID', `space_id` bigint NOT NULL DEFAULT 0 COMMENT 'Space ID', `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Name', `description` text NULL COMMENT 'Agent Description', `icon_uri` varchar(255) NOT NULL DEFAULT '' COMMENT 'Icon URI', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `bot_mode` tinyint NOT NULL DEFAULT 0 COMMENT 'bot mode,0:single mode 2:chatflow mode', `layout_info` text NULL COMMENT 'chatflow layout info', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', `variables_meta_id` bigint NULL COMMENT 'variables meta table ID', `model_info` json NULL COMMENT 'Model Configuration Information', `onboarding_info` json NULL COMMENT 'Onboarding Information', `prompt` json NULL COMMENT 'Agent Prompt Configuration', `plugin` json NULL COMMENT 'Agent Plugin Base Configuration', `knowledge` json NULL COMMENT 'Agent Knowledge Base Configuration', `workflow` json NULL COMMENT 'Agent Workflow Configuration', `suggest_reply` json NULL COMMENT 'Suggested Replies', `jump_config` json NULL COMMENT 'Jump Configuration', `connector_id` bigint unsigned NOT NULL COMMENT 'Connector ID', `version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Version', `background_image_info_list` json NULL COMMENT 'Background image', `database_config` json NULL COMMENT 'Agent Database Base Configuration', `shortcut_command` json NULL COMMENT 'shortcut command', PRIMARY KEY (`id`), INDEX `idx_creator_id` (`creator_id`), UNIQUE INDEX `uniq_agent_id_and_version_connector_id` (`agent_id`, `version`, `connector_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Single Agent Version Copy Table';
|
||||
-- Create 'space' table
|
||||
CREATE TABLE IF NOT EXISTS `space` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID, Space ID', `owner_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner ID', `name` varchar(200) NOT NULL DEFAULT '' COMMENT 'Space Name', `description` varchar(2000) NOT NULL DEFAULT '' COMMENT 'Space Description', `icon_uri` varchar(200) NOT NULL DEFAULT '' COMMENT 'Icon URI', `creator_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creator ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creation Time (Milliseconds)', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time (Milliseconds)', `deleted_at` bigint unsigned NULL COMMENT 'Deletion Time (Milliseconds)', PRIMARY KEY (`id`), INDEX `idx_creator_id` (`creator_id`), INDEX `idx_owner_id` (`owner_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Space Table';
|
||||
CREATE TABLE IF NOT EXISTS `space` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID, Space ID', `owner_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner ID', `name` varchar(200) NOT NULL DEFAULT '' COMMENT 'Space Name', `description` varchar(2000) NOT NULL DEFAULT '' COMMENT 'Space Description', `icon_uri` varchar(200) NOT NULL DEFAULT '' COMMENT 'Icon URI', `creator_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creator ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creation Time (Milliseconds)', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time (Milliseconds)', `deleted_at` bigint unsigned NULL COMMENT 'Deletion Time (Milliseconds)', PRIMARY KEY (`id`), INDEX `idx_creator_id` (`creator_id`), INDEX `idx_owner_id` (`owner_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Space Table' AUTO_INCREMENT 7563946286781562881;
|
||||
-- Create 'space_user' table
|
||||
CREATE TABLE IF NOT EXISTS `space_user` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID, Auto Increment', `space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Space ID', `user_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'User ID', `role_type` int NOT NULL DEFAULT 3 COMMENT 'Role Type: 1.owner 2.admin 3.member', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creation Time (Milliseconds)', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time (Milliseconds)', PRIMARY KEY (`id`), INDEX `idx_user_id` (`user_id`), UNIQUE INDEX `uniq_space_user` (`space_id`, `user_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Space Member Table';
|
||||
CREATE TABLE IF NOT EXISTS `space_user` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID, Auto Increment', `space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Space ID', `user_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'User ID', `role_type` int NOT NULL DEFAULT 3 COMMENT 'Role Type: 1.owner 2.admin 3.member', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creation Time (Milliseconds)', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time (Milliseconds)', PRIMARY KEY (`id`), INDEX `idx_user_id` (`user_id`), UNIQUE INDEX `uniq_space_user` (`space_id`, `user_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Space Member Table' AUTO_INCREMENT 2;
|
||||
-- Create 'template' table
|
||||
CREATE TABLE IF NOT EXISTS `template` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'Agent ID', `workflow_id` bigint NOT NULL DEFAULT 0 COMMENT 'Workflow ID', `space_id` bigint NOT NULL DEFAULT 0 COMMENT 'Space ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `heat` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Heat', `product_entity_type` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Product Entity Type', `meta_info` json NULL COMMENT 'Meta Info', `agent_extra` json NULL COMMENT 'Agent Extra Info', `workflow_extra` json NULL COMMENT 'Workflow Extra Info', `project_extra` json NULL COMMENT 'Project Extra Info', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_agent_id` (`agent_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Template Info Table';
|
||||
-- Create 'tool' table
|
||||
|
||||
@ -3,9 +3,9 @@ CREATE DATABASE IF NOT EXISTS opencoze COLLATE utf8mb4_unicode_ci;
|
||||
-- Create 'agent_to_database' table
|
||||
CREATE TABLE IF NOT EXISTS `agent_to_database` (`id` bigint unsigned NOT NULL COMMENT 'ID', `agent_id` bigint unsigned NOT NULL COMMENT 'Agent ID', `database_id` bigint unsigned NOT NULL COMMENT 'ID of database_info', `is_draft` bool NOT NULL COMMENT 'Is draft', `prompt_disable` bool NOT NULL DEFAULT 0 COMMENT 'Support prompt calls: 1 not supported, 0 supported', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_agent_db_draft` (`agent_id`, `database_id`, `is_draft`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'agent_to_database info';
|
||||
-- Create 'agent_tool_draft' table
|
||||
CREATE TABLE IF NOT EXISTS `agent_tool_draft` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Primary Key ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Agent ID', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Plugin ID', `tool_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Tool ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `sub_url` varchar(512) NOT NULL DEFAULT '' COMMENT 'Sub URL Path', `method` varchar(64) NOT NULL DEFAULT '' COMMENT 'HTTP Request Method', `tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Name', `tool_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Version, e.g. v1.0.0', `operation` json NULL COMMENT 'Tool Openapi Operation Schema', PRIMARY KEY (`id`), INDEX `idx_agent_plugin_tool` (`agent_id`, `plugin_id`, `tool_id`), INDEX `idx_agent_tool_bind` (`agent_id`, `created_at`), UNIQUE INDEX `uniq_idx_agent_tool_id` (`agent_id`, `tool_id`), UNIQUE INDEX `uniq_idx_agent_tool_name` (`agent_id`, `tool_name`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Draft Agent Tool';
|
||||
CREATE TABLE IF NOT EXISTS `agent_tool_draft` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Primary Key ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Agent ID', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Plugin ID', `tool_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Tool ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `sub_url` varchar(512) NOT NULL DEFAULT '' COMMENT 'Sub URL Path', `method` varchar(64) NOT NULL DEFAULT '' COMMENT 'HTTP Request Method', `tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Name', `tool_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Version, e.g. v1.0.0', `operation` json NULL COMMENT 'Tool Openapi Operation Schema', `source` tinyint NOT NULL DEFAULT 0 COMMENT 'tool source 1 coze saas 0 default', PRIMARY KEY (`id`), INDEX `idx_agent_plugin_tool` (`agent_id`, `plugin_id`, `tool_id`), INDEX `idx_agent_tool_bind` (`agent_id`, `created_at`), UNIQUE INDEX `uniq_idx_agent_tool_id` (`agent_id`, `tool_id`), UNIQUE INDEX `uniq_idx_agent_tool_name` (`agent_id`, `tool_name`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Draft Agent Tool';
|
||||
-- Create 'agent_tool_version' table
|
||||
CREATE TABLE IF NOT EXISTS `agent_tool_version` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Primary Key ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Agent ID', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Plugin ID', `tool_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Tool ID', `agent_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Tool Version', `tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Name', `tool_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Version, e.g. v1.0.0', `sub_url` varchar(512) NOT NULL DEFAULT '' COMMENT 'Sub URL Path', `method` varchar(64) NOT NULL DEFAULT '' COMMENT 'HTTP Request Method', `operation` json NULL COMMENT 'Tool Openapi Operation Schema', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', PRIMARY KEY (`id`), INDEX `idx_agent_tool_id_created_at` (`agent_id`, `tool_id`, `created_at`), INDEX `idx_agent_tool_name_created_at` (`agent_id`, `tool_name`, `created_at`), UNIQUE INDEX `uniq_idx_agent_tool_id_agent_version` (`agent_id`, `tool_id`, `agent_version`), UNIQUE INDEX `uniq_idx_agent_tool_name_agent_version` (`agent_id`, `tool_name`, `agent_version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Agent Tool Version';
|
||||
CREATE TABLE IF NOT EXISTS `agent_tool_version` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Primary Key ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Agent ID', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Plugin ID', `tool_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Tool ID', `agent_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Tool Version', `tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Name', `tool_version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Tool Version, e.g. v1.0.0', `sub_url` varchar(512) NOT NULL DEFAULT '' COMMENT 'Sub URL Path', `method` varchar(64) NOT NULL DEFAULT '' COMMENT 'HTTP Request Method', `operation` json NULL COMMENT 'Tool Openapi Operation Schema', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `source` tinyint NOT NULL DEFAULT 0 COMMENT 'tool source 1 coze saas 0 default', PRIMARY KEY (`id`), INDEX `idx_agent_tool_id_created_at` (`agent_id`, `tool_id`, `created_at`), INDEX `idx_agent_tool_name_created_at` (`agent_id`, `tool_name`, `created_at`), UNIQUE INDEX `uniq_idx_agent_tool_id_agent_version` (`agent_id`, `tool_id`, `agent_version`), UNIQUE INDEX `uniq_idx_agent_tool_name_agent_version` (`agent_id`, `tool_name`, `agent_version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Agent Tool Version';
|
||||
-- Create 'api_key' table
|
||||
CREATE TABLE IF NOT EXISTS `api_key` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID', `api_key` varchar(255) NOT NULL DEFAULT '' COMMENT 'API Key hash', `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'API Key Name', `status` tinyint NOT NULL DEFAULT 0 COMMENT '0 normal, 1 deleted', `user_id` bigint NOT NULL DEFAULT 0 COMMENT 'API Key Owner', `expired_at` bigint NOT NULL DEFAULT 0 COMMENT 'API Key Expired Time', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `last_used_at` bigint NOT NULL DEFAULT 0 COMMENT 'Used Time in Milliseconds', `ak_type` tinyint NOT NULL DEFAULT 0 COMMENT 'api key type ', PRIMARY KEY (`id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'api key table';
|
||||
-- Create 'app_connector_release_ref' table
|
||||
@ -23,15 +23,15 @@ CREATE TABLE IF NOT EXISTS `app_dynamic_conversation_online` (`id` bigint unsign
|
||||
-- Create 'app_release_record' table
|
||||
CREATE TABLE IF NOT EXISTS `app_release_record` (`id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Publish Record ID', `app_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Application ID', `space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Space ID', `owner_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner ID', `icon_uri` varchar(512) NOT NULL DEFAULT '' COMMENT 'Icon URI', `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Application Name', `description` text NULL COMMENT 'Application Description', `connector_ids` json NULL COMMENT 'Publish Connector IDs', `extra_info` json NULL COMMENT 'Publish Extra Info', `version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Release Version', `version_desc` text NULL COMMENT 'Version Description', `publish_status` tinyint NOT NULL DEFAULT 0 COMMENT 'Publish Status', `publish_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Publish Time in Milliseconds', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', PRIMARY KEY (`id`), INDEX `idx_app_publish_at` (`app_id`, `publish_at`), UNIQUE INDEX `uniq_idx_app_version_connector` (`app_id`, `version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Application Release Record';
|
||||
-- Create 'app_static_conversation_draft' table
|
||||
CREATE TABLE IF NOT EXISTS `app_static_conversation_draft` (`id` bigint unsigned NOT NULL COMMENT 'id', `template_id` bigint unsigned NOT NULL COMMENT 'template id', `user_id` bigint unsigned NOT NULL COMMENT 'user id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `conversation_id` bigint unsigned NOT NULL COMMENT 'conversation id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
CREATE TABLE IF NOT EXISTS `app_static_conversation_draft` (`id` bigint unsigned NOT NULL COMMENT 'id', `template_id` bigint unsigned NOT NULL COMMENT 'template id', `user_id` bigint unsigned NOT NULL COMMENT 'user id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `conversation_id` bigint unsigned NOT NULL COMMENT 'conversation id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'app_static_conversation_draft';
|
||||
-- Create 'app_static_conversation_online' table
|
||||
CREATE TABLE IF NOT EXISTS `app_static_conversation_online` (`id` bigint unsigned NOT NULL COMMENT 'id', `template_id` bigint unsigned NOT NULL COMMENT 'template id', `user_id` bigint unsigned NOT NULL COMMENT 'user id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `conversation_id` bigint unsigned NOT NULL COMMENT 'conversation id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
CREATE TABLE IF NOT EXISTS `app_static_conversation_online` (`id` bigint unsigned NOT NULL COMMENT 'id', `template_id` bigint unsigned NOT NULL COMMENT 'template id', `user_id` bigint unsigned NOT NULL COMMENT 'user id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `conversation_id` bigint unsigned NOT NULL COMMENT 'conversation id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'app_static_conversation_online';
|
||||
-- Create 'chat_flow_role_config' table
|
||||
CREATE TABLE IF NOT EXISTS `chat_flow_role_config` (`id` bigint unsigned NOT NULL COMMENT 'id', `workflow_id` bigint unsigned NOT NULL COMMENT 'workflow id', `connector_id` bigint unsigned NULL COMMENT 'connector id', `name` varchar(256) NOT NULL COMMENT 'role name', `description` mediumtext NULL COMMENT 'role description', `version` varchar(256) NULL COMMENT 'version', `avatar` varchar(256) NOT NULL COMMENT 'avatar uri', `background_image_info` mediumtext NULL COMMENT 'background image information, object structure', `onboarding_info` mediumtext NULL COMMENT 'intro information, object structure', `suggest_reply_info` mediumtext NULL COMMENT 'user suggestions, object structure', `audio_config` mediumtext NULL COMMENT 'agent audio config, object structure', `user_input_config` varchar(256) NOT NULL COMMENT 'user input config, object structure', `creator_id` bigint unsigned NOT NULL COMMENT 'creator id', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', `updated_at` bigint unsigned NULL COMMENT 'update time in millisecond', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_version` (`connector_id`, `version`), INDEX `idx_workflow_id_version` (`workflow_id`, `version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'chat_flow_role_config';
|
||||
-- Create 'connector_workflow_version' table
|
||||
CREATE TABLE IF NOT EXISTS `connector_workflow_version` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `app_id` bigint unsigned NOT NULL COMMENT 'app id', `connector_id` bigint unsigned NOT NULL COMMENT 'connector id', `workflow_id` bigint unsigned NOT NULL COMMENT 'workflow id', `version` varchar(256) NOT NULL COMMENT 'version', `created_at` bigint unsigned NOT NULL COMMENT 'create time in millisecond', PRIMARY KEY (`id`), INDEX `idx_connector_id_workflow_id_create_at` (`connector_id`, `workflow_id`, `created_at`), UNIQUE INDEX `uniq_connector_id_workflow_id_version` (`connector_id`, `workflow_id`, `version`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'connector workflow version';
|
||||
-- Create 'conversation' table
|
||||
CREATE TABLE IF NOT EXISTS `conversation` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `name` varchar(255) NULL DEFAULT '' COMMENT 'conversation name', `connector_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Publish Connector ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'agent_id', `scene` tinyint NOT NULL DEFAULT 0 COMMENT 'conversation scene', `section_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'section_id', `creator_id` bigint unsigned NULL DEFAULT 0 COMMENT 'creator_id', `ext` text NULL COMMENT 'ext', `status` tinyint NOT NULL DEFAULT 1 COMMENT 'status: 1-normal 2-deleted', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', PRIMARY KEY (`id`), INDEX `idx_connector_bot_status` (`connector_id`, `agent_id`, `creator_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'conversation info record';
|
||||
CREATE TABLE IF NOT EXISTS `conversation` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `name` varchar(255) NULL DEFAULT '' COMMENT 'conversation name', `connector_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Publish Connector ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'agent_id', `scene` tinyint NOT NULL DEFAULT 0 COMMENT 'conversation scene', `section_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'section_id', `creator_id` bigint unsigned NULL DEFAULT 0 COMMENT 'creator_id', `ext` text NULL COMMENT 'ext', `status` tinyint NOT NULL DEFAULT 1 COMMENT 'status: 1-normal 2-deleted', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', PRIMARY KEY (`id`), INDEX `idx_connector_bot_status` (`connector_id`, `agent_id`, `creator_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'conversation info record' AUTO_INCREMENT 7563957783431741441;
|
||||
-- Create 'data_copy_task' table
|
||||
CREATE TABLE IF NOT EXISTS `data_copy_task` (`master_task_id` varchar(128) NULL DEFAULT '' COMMENT 'task id', `origin_data_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'origin data id', `target_data_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'target data id', `origin_space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'origin space id', `target_space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'target space id', `origin_user_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'origin user id', `target_user_id` bigint unsigned NULL DEFAULT 0 COMMENT 'target user id', `origin_app_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'origin app id', `target_app_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'target app id', `data_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'data type 1:knowledge, 2:database', `ext_info` varchar(255) NOT NULL DEFAULT '' COMMENT 'ext', `start_time` bigint NULL DEFAULT 0 COMMENT 'task start time', `finish_time` bigint NULL COMMENT 'task finish time', `status` tinyint NOT NULL DEFAULT 1 COMMENT '1: Create 2: Running 3: Success 4: Failure', `error_msg` varchar(128) NULL COMMENT 'error msg', `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_master_task_id_origin_data_id_data_type` (`master_task_id`, `origin_data_id`, `data_type`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'data copy task record';
|
||||
-- Create 'draft_database_info' table
|
||||
@ -73,7 +73,7 @@ CREATE TABLE IF NOT EXISTS `prompt_resource` (`id` bigint unsigned NOT NULL AUTO
|
||||
-- Create 'run_record' table
|
||||
CREATE TABLE IF NOT EXISTS `run_record` (`id` bigint unsigned NOT NULL COMMENT 'id', `conversation_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'conversation id', `section_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'section ID', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'agent_id', `user_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'user id', `source` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Execute source 0 API', `status` varchar(255) NOT NULL DEFAULT '' COMMENT 'status,0 Unknown, 1-Created,2-InProgress,3-Completed,4-Failed,5-Expired,6-Cancelled,7-RequiresAction', `creator_id` bigint NOT NULL DEFAULT 0 COMMENT 'creator id', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `failed_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Fail Time in Milliseconds', `last_error` text NULL COMMENT 'error message' COLLATE utf8mb4_general_ci, `completed_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Finish Time in Milliseconds', `chat_request` text NULL COMMENT 'Original request field' COLLATE utf8mb4_general_ci, `ext` text NULL COMMENT 'ext' COLLATE utf8mb4_general_ci, `usage` json NULL COMMENT 'usage', PRIMARY KEY (`id`), INDEX `idx_c_s` (`conversation_id`, `section_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'run record';
|
||||
-- Create 'shortcut_command' table
|
||||
CREATE TABLE IF NOT EXISTS `shortcut_command` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `object_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID, this command can be used for this entity', `command_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'command id', `command_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'command name', `shortcut_command` varchar(255) NOT NULL DEFAULT '' COMMENT 'shortcut command', `description` varchar(2000) NOT NULL DEFAULT '' COMMENT 'description', `send_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'send type 0:query 1:panel', `tool_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Type 1 of tool used: WorkFlow 2: Plugin', `work_flow_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'workflow id', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'plugin id', `plugin_tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'plugin tool name', `template_query` text NULL COMMENT 'template query', `components` json NULL COMMENT 'Panel parameters', `card_schema` text NULL COMMENT 'card schema', `tool_info` json NULL COMMENT 'Tool information includes name+variable list', `status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Status, 0 is invalid, 1 is valid', `creator_id` bigint unsigned NULL DEFAULT 0 COMMENT 'creator id', `is_online` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Is online information: 0 draft 1 online', `created_at` bigint NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'When executing a multi instruction, which node executes the instruction', `shortcut_icon` json NULL COMMENT 'shortcut icon', `plugin_tool_id` bigint NOT NULL DEFAULT 0 COMMENT 'tool_id', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_object_command_id_type` (`object_id`, `command_id`, `is_online`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'bot shortcut command table';
|
||||
CREATE TABLE IF NOT EXISTS `shortcut_command` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `object_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID, this command can be used for this entity', `command_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'command id', `command_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'command name', `shortcut_command` varchar(255) NOT NULL DEFAULT '' COMMENT 'shortcut command', `description` varchar(2000) NOT NULL DEFAULT '' COMMENT 'description', `send_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'send type 0:query 1:panel', `tool_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Type 1 of tool used: WorkFlow 2: Plugin', `work_flow_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'workflow id', `plugin_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'plugin id', `plugin_tool_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'plugin tool name', `template_query` text NULL COMMENT 'template query', `components` json NULL COMMENT 'Panel parameters', `card_schema` text NULL COMMENT 'card schema', `tool_info` json NULL COMMENT 'Tool information includes name+variable list', `status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Status, 0 is invalid, 1 is valid', `creator_id` bigint unsigned NULL DEFAULT 0 COMMENT 'creator id', `is_online` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Is online information: 0 draft 1 online', `created_at` bigint NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `agent_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'When executing a multi instruction, which node executes the instruction', `shortcut_icon` json NULL COMMENT 'shortcut icon', `plugin_tool_id` bigint NOT NULL DEFAULT 0 COMMENT 'tool_id', `source` tinyint NULL DEFAULT 0 COMMENT 'plugin source 1 coze saas 0 default', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_object_command_id_type` (`object_id`, `command_id`, `is_online`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'bot shortcut command table';
|
||||
-- Create 'single_agent_draft' table
|
||||
CREATE TABLE IF NOT EXISTS `single_agent_draft` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'Agent ID', `creator_id` bigint NOT NULL DEFAULT 0 COMMENT 'Creator ID', `space_id` bigint NOT NULL DEFAULT 0 COMMENT 'Space ID', `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Name', `description` text NULL COMMENT 'Agent Description', `icon_uri` varchar(255) NOT NULL DEFAULT '' COMMENT 'Icon URI', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', `variables_meta_id` bigint NULL COMMENT 'variables meta table ID', `model_info` json NULL COMMENT 'Model Configuration Information', `onboarding_info` json NULL COMMENT 'Onboarding Information', `prompt` json NULL COMMENT 'Agent Prompt Configuration', `plugin` json NULL COMMENT 'Agent Plugin Base Configuration', `knowledge` json NULL COMMENT 'Agent Knowledge Base Configuration', `workflow` json NULL COMMENT 'Agent Workflow Configuration', `suggest_reply` json NULL COMMENT 'Suggested Replies', `jump_config` json NULL COMMENT 'Jump Configuration', `background_image_info_list` json NULL COMMENT 'Background image', `database_config` json NULL COMMENT 'Agent Database Base Configuration', `bot_mode` tinyint NOT NULL DEFAULT 0 COMMENT 'bot mode,0:single mode 2:chatflow mode', `layout_info` text NULL COMMENT 'chatflow layout info', `shortcut_command` json NULL COMMENT 'shortcut command', PRIMARY KEY (`id`), INDEX `idx_creator_id` (`creator_id`), UNIQUE INDEX `uniq_agent_id` (`agent_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Single Agent Draft Copy Table';
|
||||
-- Create 'single_agent_publish' table
|
||||
@ -81,9 +81,9 @@ CREATE TABLE IF NOT EXISTS `single_agent_publish` (`id` bigint unsigned NOT NULL
|
||||
-- Create 'single_agent_version' table
|
||||
CREATE TABLE IF NOT EXISTS `single_agent_version` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'Agent ID', `creator_id` bigint NOT NULL DEFAULT 0 COMMENT 'Creator ID', `space_id` bigint NOT NULL DEFAULT 0 COMMENT 'Space ID', `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Name', `description` text NULL COMMENT 'Agent Description', `icon_uri` varchar(255) NOT NULL DEFAULT '' COMMENT 'Icon URI', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `bot_mode` tinyint NOT NULL DEFAULT 0 COMMENT 'bot mode,0:single mode 2:chatflow mode', `layout_info` text NULL COMMENT 'chatflow layout info', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time in Milliseconds', `deleted_at` datetime(3) NULL COMMENT 'delete time in millisecond', `variables_meta_id` bigint NULL COMMENT 'variables meta table ID', `model_info` json NULL COMMENT 'Model Configuration Information', `onboarding_info` json NULL COMMENT 'Onboarding Information', `prompt` json NULL COMMENT 'Agent Prompt Configuration', `plugin` json NULL COMMENT 'Agent Plugin Base Configuration', `knowledge` json NULL COMMENT 'Agent Knowledge Base Configuration', `workflow` json NULL COMMENT 'Agent Workflow Configuration', `suggest_reply` json NULL COMMENT 'Suggested Replies', `jump_config` json NULL COMMENT 'Jump Configuration', `connector_id` bigint unsigned NOT NULL COMMENT 'Connector ID', `version` varchar(255) NOT NULL DEFAULT '' COMMENT 'Agent Version', `background_image_info_list` json NULL COMMENT 'Background image', `database_config` json NULL COMMENT 'Agent Database Base Configuration', `shortcut_command` json NULL COMMENT 'shortcut command', PRIMARY KEY (`id`), INDEX `idx_creator_id` (`creator_id`), UNIQUE INDEX `uniq_agent_id_and_version_connector_id` (`agent_id`, `version`, `connector_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Single Agent Version Copy Table';
|
||||
-- Create 'space' table
|
||||
CREATE TABLE IF NOT EXISTS `space` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID, Space ID', `owner_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner ID', `name` varchar(200) NOT NULL DEFAULT '' COMMENT 'Space Name', `description` varchar(2000) NOT NULL DEFAULT '' COMMENT 'Space Description', `icon_uri` varchar(200) NOT NULL DEFAULT '' COMMENT 'Icon URI', `creator_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creator ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creation Time (Milliseconds)', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time (Milliseconds)', `deleted_at` bigint unsigned NULL COMMENT 'Deletion Time (Milliseconds)', PRIMARY KEY (`id`), INDEX `idx_creator_id` (`creator_id`), INDEX `idx_owner_id` (`owner_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Space Table';
|
||||
CREATE TABLE IF NOT EXISTS `space` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID, Space ID', `owner_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner ID', `name` varchar(200) NOT NULL DEFAULT '' COMMENT 'Space Name', `description` varchar(2000) NOT NULL DEFAULT '' COMMENT 'Space Description', `icon_uri` varchar(200) NOT NULL DEFAULT '' COMMENT 'Icon URI', `creator_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creator ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creation Time (Milliseconds)', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time (Milliseconds)', `deleted_at` bigint unsigned NULL COMMENT 'Deletion Time (Milliseconds)', PRIMARY KEY (`id`), INDEX `idx_creator_id` (`creator_id`), INDEX `idx_owner_id` (`owner_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Space Table' AUTO_INCREMENT 7563946286781562881;
|
||||
-- Create 'space_user' table
|
||||
CREATE TABLE IF NOT EXISTS `space_user` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID, Auto Increment', `space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Space ID', `user_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'User ID', `role_type` int NOT NULL DEFAULT 3 COMMENT 'Role Type: 1.owner 2.admin 3.member', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creation Time (Milliseconds)', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time (Milliseconds)', PRIMARY KEY (`id`), INDEX `idx_user_id` (`user_id`), UNIQUE INDEX `uniq_space_user` (`space_id`, `user_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Space Member Table';
|
||||
CREATE TABLE IF NOT EXISTS `space_user` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID, Auto Increment', `space_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Space ID', `user_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'User ID', `role_type` int NOT NULL DEFAULT 3 COMMENT 'Role Type: 1.owner 2.admin 3.member', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Creation Time (Milliseconds)', `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Update Time (Milliseconds)', PRIMARY KEY (`id`), INDEX `idx_user_id` (`user_id`), UNIQUE INDEX `uniq_space_user` (`space_id`, `user_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Space Member Table' AUTO_INCREMENT 2;
|
||||
-- Create 'template' table
|
||||
CREATE TABLE IF NOT EXISTS `template` (`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID', `agent_id` bigint NOT NULL DEFAULT 0 COMMENT 'Agent ID', `workflow_id` bigint NOT NULL DEFAULT 0 COMMENT 'Workflow ID', `space_id` bigint NOT NULL DEFAULT 0 COMMENT 'Space ID', `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Create Time in Milliseconds', `heat` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Heat', `product_entity_type` bigint unsigned NOT NULL DEFAULT 0 COMMENT 'Product Entity Type', `meta_info` json NULL COMMENT 'Meta Info', `agent_extra` json NULL COMMENT 'Agent Extra Info', `workflow_extra` json NULL COMMENT 'Workflow Extra Info', `project_extra` json NULL COMMENT 'Project Extra Info', PRIMARY KEY (`id`), UNIQUE INDEX `uniq_agent_id` (`agent_id`)) ENGINE=InnoDB CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Template Info Table';
|
||||
-- Create 'tool' table
|
||||
|
||||
Reference in New Issue
Block a user