(root@127.0.0.1) [test]>CREATE TABLE `subscriptions` (
-> `id` int(11) NOT NULL AUTO_INCREMENT,
-> `createdat` datetime(3) NOT NULL,
-> `updatedat` datetime(3) NOT NULL,
-> `deletedat` datetime(3) DEFAULT NULL,
-> `userid` bigint(20) NOT NULL,
-> `topic` char(25) COLLATE utf8mb4_unicode_ci NOT NULL,
-> `delseqid` bigint(20) DEFAULT '0' COMMENT '删除seqid',
-> `recvseqid` int(11) DEFAULT '0',
-> `readseqid` int(11) DEFAULT '0',
-> `modegwant` char(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
-> `modegwin` char(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
-> `domain` tinyint(1) NOT NULL DEFAULT '0',
-> `crvseqid` int(11) NOT NULL DEFAULT '0',
-> `delseqid` bigint(20) NOT NULL DEFAULT '0' ,
-> `isdisplay` tinyint(1) NOT NULL DEFAULT '1' ,
-> PRIMARY KEY (`id`),
-> UNIQUE KEY `subscriptions_topic_userid` (`topic`,`userid`),
-> KEY `subscriptions_deletedat` (`deletedat`),
-> KEY `userid` (`userid`),
-> KEY `idx_user_deletedat` (`userid`,`deletedat`),
-> KEY `idx_userid_domain_deletedat` (`userid`,`domain`,`deletedat`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
ERROR 1060 (42S21): Duplicate column name 'delseqid'
(root@127.0.0.1) [test]>
(root@127.0.0.1) [test]>CREATE TABLE `subscriptions` (
-> `id` int(11) NOT NULL AUTO_INCREMENT,
-> `createdat` datetime(3) NOT NULL,
-> `updatedat` datetime(3) NOT NULL,
-> `deletedat` datetime(3) DEFAULT NULL,
-> `userid` bigint(20) NOT NULL,
-> `topic` char(25) COLLATE utf8mb4_unicode_ci NOT NULL,
-> `delseqid` bigint(20) DEFAULT '0' COMMENT '删除seqid',
-> `recvseqid` int(11) DEFAULT '0',
-> `readseqid` int(11) DEFAULT '0',
-> `modegwant` char(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
-> `modegwin` char(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
-> `domain` tinyint(1) NOT NULL DEFAULT '0',
-> `csrecvseqid` int(11) NOT NULL DEFAULT '0',
-> `delseqid` bigint(20) NOT NULL DEFAULT '0' COMMENT '用户清除聊天记录的最大seqid',
-> `isdisplay` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否展示会话信息 0 显示 1 不显示',
-> PRIMARY KEY (`id`),
-> UNIQUE KEY `subscriptions_topic_userid` (`topic`,`userid`),
-> KEY `subscriptions_deletedat` (`deletedat`),
-> KEY `userid` (`userid`),
-> KEY `idx_user_deletedat` (`userid`,`deletedat`),
-> KEY `idx_userid_domain_deletedat` (`userid`,`domain`,`deletedat`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
ERROR 1060 (42S21): Duplicate column name 'delseqid'
(root@127.0.0.1) [test]>
(root@127.0.0.1) [test]>
(root@127.0.0.1) [test]>CREATE TABLE `subscriptions` (
-> `id` int(11) NOT NULL AUTO_INCREMENT,
-> `createdat` datetime(3) NOT NULL,
-> `updatedat` datetime(3) NOT NULL,
-> `deletedat` datetime(3) DEFAULT NULL,
-> `userid` bigint(20) NOT NULL,
-> `topic` char(25) COLLATE utf8mb4_unicode_ci NOT NULL,
-> `delseqid` bigint(20) DEFAULT '0' COMMENT '删除seqid',
-> `recvseqid` int(11) DEFAULT '0',
-> `readseqid` int(11) DEFAULT '0',
-> `modegwant` char(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
-> `modegwin` char(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
-> `domain` tinyint(1) NOT NULL DEFAULT '0',
-> `csrecvseqid` int(11) NOT NULL DEFAULT '0',
-> `isdisplay` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否展示会话信息 0 显示 1 不显示',
-> PRIMARY KEY (`id`),
-> UNIQUE KEY `subscriptions_topic_userid` (`topic`,`userid`),
-> KEY `subscriptions_deletedat` (`deletedat`),
-> KEY `userid` (`userid`),
-> KEY `idx_user_deletedat` (`userid`,`deletedat`),
-> KEY `idx_userid_domain_deletedat` (`userid`,`domain`,`deletedat`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
LL, 1003, 'topicC', 0, 30, 25, 'wantC', 'winC', 0, 300, 0),
('2024-08-01 10:03:00.000', '2024-08-01 10:13:00.000', NULL, 1004, 'topicD', 0, 40, 35, NULL, NULL, 1, 400, 1),
('2024-08-01 10:04:00.000', '2024-08-01 10:14:00.000', NULL, 1005, 'topicE', 0, 50, 45, 'wantE', NULL, 0, 500, 1),
('2024-08-01 10:05:00.000', '2024-08-01 10:15:00.000', NULL, 1006, 'topicF', 0, 60, 55, NULL, 'winF', 1, 600, 0),
('2024-08-01 10:06:00.000', '2024-08-01 10:16:00.000', NULL, 1007, 'topicG', 0, 70, 65, 'wantG', 'winG', 0, 700, 1),
('2024-08-01 10:07:00.000', '2024-08-01 10:17:00.000', NULL, 1008, 'topicH', 0, 80, 75, NULL, NULL, 1, 800, 1),
('2024-08-01 10:08:00.000', '2024-08-01 10:18:00.000', NULL, 1009, 'topicI', 0, 90, 85, 'wantI', 'winI', 0, 900, 0),
('2024-08-01 10:09:00.000', '2024-08-01 10:19:00.000', NULL, 1010, 'topicJ', 0, 100, 95, 'wantJ', NULL, 1, 1000, 1);
ALTER TABLE `subscriptions`
MODIFY COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT;
Query OK, 0 rows affected, 6 warnings (0.10 sec)
(root@127.0.0.1) [test]>
(root@127.0.0.1) [test]>INSERT INTO `subscriptions`
-> (`createdat`, `updatedat`, `deletedat`, `userid`, `topic`, `delseqid`, `recvseqid`, `readseqid`, `modegwant`, `modegwin`, `domain`, `csrecvseqid`, `isdisplay`)
-> VALUES
-> ('2024-08-01 10:00:00.000', '2024-08-01 10:10:00.000', NULL, 1001, 'topicA', 0, 10, 5, 'wantA', 'winA', 0, 100, 1),
-> ('2024-08-01 10:01:00.000', '2024-08-01 10:11:00.000', NULL, 1002, 'topicB', 0, 20, 15, 'wantB', 'winB', 1, 200, 1),
-> ('2024-08-01 10:02:00.000', '2024-08-01 10:12:00.000', NULL, 1003, 'topicC', 0, 30, 25, 'wantC', 'winC', 0, 300, 0),
-> ('2024-08-01 10:03:00.000', '2024-08-01 10:13:00.000', NULL, 1004, 'topicD', 0, 40, 35, NULL, NULL, 1, 400, 1),
-> ('2024-08-01 10:04:00.000', '2024-08-01 10:14:00.000', NULL, 1005, 'topicE', 0, 50, 45, 'wantE', NULL, 0, 500, 1),
-> ('2024-08-01 10:05:00.000', '2024-08-01 10:15:00.000', NULL, 1006, 'topicF', 0, 60, 55, NULL, 'winF', 1, 600, 0),
-> ('2024-08-01 10:06:00.000', '2024-08-01 10:16:00.000', NULL, 1007, 'topicG', 0, 70, 65, 'wantG', 'winG', 0, 700, 1),
-> ('2024-08-01 10:07:00.000', '2024-08-01 10:17:00.000', NULL, 1008, 'topicH', 0, 80, 75, NULL, NULL, 1, 800, 1),
-> ('2024-08-01 10:08:00.000', '2024-08-01 10:18:00.000', NULL, 1009, 'topicI', 0, 90, 85, 'wantI', 'winI', 0, 900, 0),
-> ('2024-08-01 10:09:00.000', '2024-08-01 10:19:00.000', NULL, 1010, 'topicJ', 0, 100, 95, 'wantJ', NULL, 1, 1000, 1);
Query OK, 10 rows affected (0.02 sec)
Records: 10 Duplicates: 0 Warnings: 0
(root@127.0.0.1) [test]>
(root@127.0.0.1) [test]>ALTER TABLE `subscriptions`
-> MODIFY COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT;
Query OK, 0 rows affected (0.08 sec)
(root@127.0.0.1) [test]>admin show ddl jobs;
+--------+---------------------+----------------------+-------------------------------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+-------------+
| JOB_ID | DB_NAME | TABLE_NAME | JOB_TYPE | SCHEMA_STATE | SCHEMA_ID | TABLE_ID | ROW_COUNT | CREATE_TIME | START_TIME | END_TIME | STATE | COMMENTS |
+--------+---------------------+----------------------+-------------------------------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+-------------+
| 932 | test | subscriptions | modify column | public | 876 | 930 | 0 | 2025-08-26 13:54:34.372000 | 2025-08-26 13:54:34.372000 | 2025-08-26 13:54:34.422000 | synced | |
| 931 | test | subscriptions | create table | public | 876 | 930 | 0 | 2025-08-26 13:54:34.271000 | 2025-08-26 13:54:34.271000 | 2025-08-26 13:54:34.321000 | synced | |
| 929 | test | wa_data | create table | public | 876 | 928 | 0 | 2025-08-19 14:59:23.521000 | 2025-08-19 14:59:23.521000 | 2025-08-19 14:59:23.570000 | synced | |
| 927 | test | abc | add index | public | 876 | 925 | 0 | 2025-08-19 09:59:18.621000 | 2025-08-19 09:59:18.621000 | 2025-08-19 09:59:18.821000 | synced | ingest, DXF |
| 926 | test | abc | create table | public | 876 | 925 | 0 | 2025-08-19 09:57:00.471000 | 2025-08-19 09:57:00.521000 | 2025-08-19 09:57:00.570000 | synced | |
| 924 | spd_shsy | base_his_info | create table | public | 919 | 923 | 0 | 2025-08-14 15:33:51.587000 | 2025-08-14 15:33:51.637000 | 2025-08-14 15:33:51.787000 | synced | |
| 922 | spd_shsy | base_producer | create table | public | 919 | 921 | 0 | 2025-08-14 15:33:51.487000 | 2025-08-14 15:33:51.537000 | 2025-08-14 15:33:51.587000 | synced | |
| 920 | spd_shsy | | create schema | public | 919 | 0 | 0 | 2025-08-14 15:33:51.437000 | 2025-08-14 15:33:51.437000 | 2025-08-14 15:33:51.487000 | synced | |
| 918 | test | t | truncate table | public | 876 | 886 | 0 | 2025-08-14 09:30:23.537000 | 2025-08-14 09:30:23.589000 | 2025-08-14 09:30:23.688000 | synced | |
| 916 | finance_transaction | hs_accounts_main_tmp | update tiflash replica status | public | 911 | 913 | 0 | 2025-08-13 14:27:40.087000 | 2025-08-13 14:27:40.087000 | 2025-08-13 14:27:40.187000 | synced | |
+--------+---------------------+----------------------+-------------------------------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+-------------+
10 rows in set (0.06 sec)
测试下来是秒加的