02worker-samples.sql 1.0 KB

123456789101112131415161718192021
  1. USE powerjob-daily;
  2. SET NAMES utf8mb4;
  3. SET FOREIGN_KEY_CHECKS = 0;
  4. CREATE TABLE IF NOT EXISTS `app_info` (
  5. `id` bigint NOT NULL AUTO_INCREMENT COMMENT '应用ID',
  6. `app_name` varchar(128) not NULL COMMENT '应用名称',
  7. `current_server` varchar(255) default null COMMENT 'Server地址,用于负责调度应用的ActorSystem地址',
  8. `gmt_create` datetime not null COMMENT '创建时间',
  9. `gmt_modified` datetime not null COMMENT '更新时间',
  10. `password` varchar(255) not null COMMENT '应用密码',
  11. PRIMARY KEY (`id`),
  12. UNIQUE KEY `uidx01_app_info` (`app_name`)
  13. ) ENGINE = InnoDB AUTO_INCREMENT = 1
  14. DEFAULT CHARSET = utf8mb4
  15. COLLATE = utf8mb4_general_ci COMMENT ='应用表';
  16. insert into app_info (app_name, gmt_create, gmt_modified, password) select 'powerjob-worker-samples', current_timestamp(), current_timestamp(), 'powerjob123' from dual where not exists ( select * from app_info where app_name = 'powerjob-worker-samples');
  17. SET FOREIGN_KEY_CHECKS = 1;