feature(agent): delete ddl not null field default value

This commit is contained in:
yhjun1026
2025-04-28 11:21:27 +08:00
parent 07c704a4d0
commit 855852cc2d
2 changed files with 12 additions and 12 deletions

View File

@@ -265,11 +265,11 @@ CREATE TABLE `gpts_messages` (
`role` varchar(255) DEFAULT NULL COMMENT 'The role of the current message content', `role` varchar(255) DEFAULT NULL COMMENT 'The role of the current message content',
`created_at` datetime DEFAULT NULL COMMENT 'create time', `created_at` datetime DEFAULT NULL COMMENT 'create time',
`updated_at` datetime DEFAULT NULL COMMENT 'last update time', `updated_at` datetime DEFAULT NULL COMMENT 'last update time',
`message_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'message id', `message_id` varchar(255) NOT NULL COMMENT 'message id',
`thinking` longtext DEFAULT NULL COMMENT 'llm thinking text', `thinking` longtext DEFAULT NULL COMMENT 'llm thinking text',
`show_message` tinyint(4) DEFAULT NULL COMMENT 'Whether the current message needs to be displayed to the user', `show_message` tinyint(4) DEFAULT NULL COMMENT 'Whether the current message needs to be displayed to the user',
`sender_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Who(name) speaking in the current conversation turn', `sender_name` varchar(255) NOT NULL COMMENT 'Who(name) speaking in the current conversation turn',
`receiver_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Who(name) receive message in the current conversation turn', `receiver_name` varchar(255) NOT NULL COMMENT 'Who(name) receive message in the current conversation turn',
`avatar` varchar(255) DEFAULT '' COMMENT 'Who(avatar) send message in the current conversation turn', `avatar` varchar(255) DEFAULT '' COMMENT 'Who(avatar) send message in the current conversation turn',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_q_messages` (`conv_id`,`rounds`,`sender`) KEY `idx_q_messages` (`conv_id`,`rounds`,`sender`)
@@ -292,12 +292,12 @@ CREATE TABLE `gpts_plans` (
`result` longtext COMMENT 'subtask result', `result` longtext COMMENT 'subtask result',
`created_at` datetime DEFAULT NULL COMMENT 'create time', `created_at` datetime DEFAULT NULL COMMENT 'create time',
`updated_at` datetime DEFAULT NULL COMMENT 'last update time', `updated_at` datetime DEFAULT NULL COMMENT 'last update time',
`conv_round` int(11) NOT NULL DEFAULT '0' COMMENT 'the current conversation turn number', `conv_round` int(11) NOT NULL COMMENT 'the current conversation turn number',
`sub_task_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'the message task id', `sub_task_id` varchar(255) NOT NULL COMMENT 'the message task id',
`task_parent` varchar(255) DEFAULT '' COMMENT 'Subtask parent task i', `task_parent` varchar(255) DEFAULT '' COMMENT 'Subtask parent task i',
`action` text DEFAULT NULL COMMENT 'plan action', `action` text DEFAULT NULL COMMENT 'plan action',
`action_input` longtext DEFAULT NULL COMMENT 'plan action input', `action_input` longtext DEFAULT NULL COMMENT 'plan action input',
`task_uid` varchar(255) NOT NULL DEFAULT '' COMMENT 'task uid'; `task_uid` varchar(255) NOT NULL COMMENT 'task uid';
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `uk_sub_task` (`conv_id`,`sub_task_num`) UNIQUE KEY `uk_sub_task` (`conv_id`,`sub_task_num`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT="gpt plan"; ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT="gpt plan";

View File

@@ -8,21 +8,21 @@ ALTER TABLE `gpts_messages`
MODIFY COLUMN `action_report` longtext COMMENT 'Current conversation action report'; MODIFY COLUMN `action_report` longtext COMMENT 'Current conversation action report';
ALTER TABLE `gpts_messages` ALTER TABLE `gpts_messages`
ADD COLUMN `message_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'message id', ADD COLUMN `message_id` varchar(255) NOT NULL COMMENT 'message id',
ADD COLUMN `thinking` longtext DEFAULT NULL COMMENT 'llm thinking text', ADD COLUMN `thinking` longtext DEFAULT NULL COMMENT 'llm thinking text',
ADD COLUMN `show_message` tinyint(4) DEFAULT NULL COMMENT 'Whether the current message needs to be displayed to the user', ADD COLUMN `show_message` tinyint(4) DEFAULT NULL COMMENT 'Whether the current message needs to be displayed to the user',
ADD COLUMN `sender_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Who(name) speaking in the current conversation turn', ADD COLUMN `sender_name` varchar(255) NOT NULL COMMENT 'Who(name) speaking in the current conversation turn',
ADD COLUMN `receiver_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Who(name) receive message in the current conversation turn', ADD COLUMN `receiver_name` varchar(255) NOT NULL COMMENT 'Who(name) receive message in the current conversation turn',
ADD COLUMN `avatar` varchar(255) DEFAULT '' COMMENT 'Who(avatar) send message in the current conversation turn'; ADD COLUMN `avatar` varchar(255) DEFAULT '' COMMENT 'Who(avatar) send message in the current conversation turn';
ALTER TABLE `gpts_plans` ALTER TABLE `gpts_plans`
ADD COLUMN conv_round int(11) NOT NULL DEFAULT '0' COMMENT 'the current conversation turn number', ADD COLUMN conv_round int(11) NOT NULL COMMENT 'the current conversation turn number',
ADD COLUMN sub_task_id varchar(255) NOT NULL DEFAULT '' COMMENT 'the message task id', ADD COLUMN sub_task_id varchar(255) NOT NULL COMMENT 'the message task id',
ADD COLUMN task_parent varchar(255) DEFAULT '' COMMENT 'Subtask parent task i', ADD COLUMN task_parent varchar(255) DEFAULT '' COMMENT 'Subtask parent task i',
ADD COLUMN `action` text DEFAULT NULL COMMENT 'plan action', ADD COLUMN `action` text DEFAULT NULL COMMENT 'plan action',
ADD COLUMN `action_input` longtext DEFAULT NULL COMMENT 'plan action input', ADD COLUMN `action_input` longtext DEFAULT NULL COMMENT 'plan action input',
ADD COLUMN `task_uid` varchar(255) NOT NULL DEFAULT '' COMMENT 'task uid'; ADD COLUMN `task_uid` varchar(255) NOT NULL COMMENT 'task uid';
ALTER TABLE `gpts_app_detail` ALTER TABLE `gpts_app_detail`
ADD COLUMN `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'bind agent type, default agent'; ADD COLUMN `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'bind agent type, default agent';