mirror of
https://gitee.com/goploy/goploy.git
synced 2024-11-29 18:57:59 +08:00
23 lines
1.4 KiB
SQL
23 lines
1.4 KiB
SQL
CREATE TABLE `crontab` (
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
`command` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
|
|
`command_md5` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'command md5 for replace',
|
|
`creator_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
`creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
|
|
`editor_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
`editor` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
|
|
`insert_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
UNIQUE KEY `uk_command_md5` (`command_md5`) USING BTREE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
CREATE TABLE `crontab_server` (
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
`crontab_id` int(10) unsigned NOT NULL,
|
|
`server_id` int(10) unsigned NOT NULL,
|
|
`insert_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
UNIQUE KEY `idx_crontab_server` (`crontab_id`,`server_id`) USING BTREE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; |