重新初始化仓库
This commit is contained in:
		
							
								
								
									
										16
									
								
								sql/config.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								sql/config.sql
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,16 @@
 | 
			
		||||
CREATE TABLE `config`
 | 
			
		||||
(
 | 
			
		||||
    `id`             bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '命名空间ID',
 | 
			
		||||
    `namespace_id`   bigint(20)          NOT NULL DEFAULT 0 COMMENT '命名空间ID',
 | 
			
		||||
    `field`          varchar(512)        NOT NULL DEFAULT '' COMMENT '配置字段',
 | 
			
		||||
    `value`          text                NOT NULL COMMENT '配置值',
 | 
			
		||||
    `description`    varchar(512)        NOT NULL DEFAULT '' COMMENT '配置描述',
 | 
			
		||||
    `create_user_id` varchar(128)        NOT NULL DEFAULT '' COMMENT '创建人ID',
 | 
			
		||||
    `modify_user_id` varchar(128)        NOT NULL DEFAULT '' COMMENT '修改人ID',
 | 
			
		||||
    `create_time`    timestamp           NOT NULL DEFAULT current_timestamp() COMMENT '创建时间',
 | 
			
		||||
    `modify_time`    timestamp           NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '更新时间',
 | 
			
		||||
    PRIMARY KEY (`id`),
 | 
			
		||||
    UNIQUE KEY `unqi_namespace_field` (`namespace_id`, `field`),
 | 
			
		||||
    KEY `idx_create_id` (`create_user_id`)
 | 
			
		||||
) ENGINE = InnoDB
 | 
			
		||||
  DEFAULT CHARSET = utf8mb4 COMMENT ='配置信息表';
 | 
			
		||||
							
								
								
									
										16
									
								
								sql/log.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								sql/log.sql
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,16 @@
 | 
			
		||||
CREATE TABLE `log`
 | 
			
		||||
(
 | 
			
		||||
    `id`             bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '命名空间ID',
 | 
			
		||||
    `namespace_id`   bigint(20)          NOT NULL DEFAULT 0 COMMENT '命名空间ID',
 | 
			
		||||
    `config_id`      bigint(20)          NOT NULL default 0 COMMENT '配置ID',
 | 
			
		||||
    `before_value`   text                NOT NULL COMMENT '变更前的值',
 | 
			
		||||
    `after_value`    text                NOT NULL COMMENT '变更后的值',
 | 
			
		||||
    `description`    varchar(512)        NOT NULL DEFAULT '' COMMENT '变更描述',
 | 
			
		||||
    `log_type`       varchar(128)        not null default '' comment '日志类型 0 - 新建命名空间,参见代码枚举值',
 | 
			
		||||
    `create_user_id` varchar(128)        NOT NULL DEFAULT '' COMMENT '创建人ID',
 | 
			
		||||
    `create_time`    timestamp           NOT NULL DEFAULT current_timestamp() COMMENT '创建时间',
 | 
			
		||||
    `modify_time`    timestamp           NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '更新时间',
 | 
			
		||||
    PRIMARY KEY (`id`),
 | 
			
		||||
    KEY `idx_create_id` (`create_user_id`)
 | 
			
		||||
) ENGINE = InnoDB
 | 
			
		||||
  DEFAULT CHARSET = utf8mb4 COMMENT ='操作日志表';
 | 
			
		||||
							
								
								
									
										16
									
								
								sql/namespace.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								sql/namespace.sql
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,16 @@
 | 
			
		||||
CREATE TABLE `namespace`
 | 
			
		||||
(
 | 
			
		||||
    `id`             bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '命名空间ID',
 | 
			
		||||
    `namespace`      varchar(256)        NOT NULL DEFAULT '' COMMENT '命名空间',
 | 
			
		||||
    `name`           varchar(128)        NOT NULL DEFAULT '' COMMENT '命名空间名称',
 | 
			
		||||
    `description`    varchar(4096)       NOT NULL DEFAULT '' COMMENT '命名空间详细描述',
 | 
			
		||||
    `status`         int(10) unsigned    NOT NULL DEFAULT 0 COMMENT '空间状态: 0 - 待激活 1 - 正常 2 - 停用',
 | 
			
		||||
    `create_user_id` varchar(128)        NOT NULL DEFAULT '' COMMENT '创建人ID',
 | 
			
		||||
    `modify_user_id` varchar(128)        NOT NULL DEFAULT '' COMMENT '修改人ID',
 | 
			
		||||
    `create_time`    timestamp           NOT NULL DEFAULT current_timestamp() COMMENT '创建时间',
 | 
			
		||||
    `modify_time`    timestamp           NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '更新时间',
 | 
			
		||||
    PRIMARY KEY (`id`),
 | 
			
		||||
    UNIQUE KEY `unqi_namespace` (`namespace`),
 | 
			
		||||
    KEY `idx_create_id` (`create_user_id`)
 | 
			
		||||
) ENGINE = InnoDB
 | 
			
		||||
  DEFAULT CHARSET = utf8mb4 COMMENT ='命名空间信息表'
 | 
			
		||||
		Reference in New Issue
	
	Block a user