manage.sql 1.2 KB

12345678910111213141516171819202122232425262728
  1. CREATE DATABASE `saas_manage` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
  2. use `saas_manage`;
  3. create table `datacenter` (
  4. name varchar(30) primary key not null,
  5. description varchar(300) comment '描述'
  6. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据中心';
  7. create table `datasource` (
  8. id int primary key not null auto_increment,
  9. dc_name varchar(30) not null,
  10. db_name varchar(30) not null comment '数据库名',
  11. db_realname varchar(30) comment '数据库真实名',
  12. db_host varchar(100) comment '数据库服务器',
  13. db_port int comment '数据库端口',
  14. db_username varchar(30) comment '数据库登录账号',
  15. db_password varchar(64) comment '数据库登录密码'
  16. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据连接';
  17. create table `backup` (
  18. id int unsigned primary key not null auto_increment,
  19. file_path int unsigned comment '文件ID',
  20. create_time datetime comment '创建时间',
  21. creator_id int unsigned comment '创建人',
  22. company_id int unsigned comment '公司',
  23. status smallint comment '状态',
  24. message varchar(1000) comment '错误信息'
  25. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='按公司数据备份';