Commit 6745cc54 by Jason Song Committed by GitHub

Add files via upload

parent 05c3c67b
......@@ -15,9 +15,9 @@ Use ApolloConfigDB;
# Dump of table app
# ------------------------------------------------------------
DROP TABLE IF EXISTS `app`;
DROP TABLE IF EXISTS `App`;
CREATE TABLE `app` (
CREATE TABLE `App` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名',
......@@ -41,9 +41,9 @@ CREATE TABLE `app` (
# Dump of table appnamespace
# ------------------------------------------------------------
DROP TABLE IF EXISTS `appnamespace`;
DROP TABLE IF EXISTS `AppNamespace`;
CREATE TABLE `appnamespace` (
CREATE TABLE `AppNamespace` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一',
`AppId` varchar(32) NOT NULL DEFAULT '' COMMENT 'app id',
......@@ -65,9 +65,9 @@ CREATE TABLE `appnamespace` (
# Dump of table audit
# ------------------------------------------------------------
DROP TABLE IF EXISTS `audit`;
DROP TABLE IF EXISTS `Audit`;
CREATE TABLE `audit` (
CREATE TABLE `Audit` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`EntityName` varchar(50) NOT NULL DEFAULT 'default' COMMENT '表名',
`EntityId` int(10) unsigned DEFAULT NULL COMMENT '记录ID',
......@@ -87,9 +87,9 @@ CREATE TABLE `audit` (
# Dump of table cluster
# ------------------------------------------------------------
DROP TABLE IF EXISTS `cluster`;
DROP TABLE IF EXISTS `Cluster`;
CREATE TABLE `cluster` (
CREATE TABLE `Cluster` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`Name` varchar(32) NOT NULL DEFAULT '' COMMENT '集群名字',
`AppId` varchar(32) NOT NULL DEFAULT '' COMMENT 'App id',
......@@ -108,9 +108,9 @@ CREATE TABLE `cluster` (
# Dump of table commit
# ------------------------------------------------------------
DROP TABLE IF EXISTS `commit`;
DROP TABLE IF EXISTS `Commit`;
CREATE TABLE `commit` (
CREATE TABLE `Commit` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`ChangeSets` longtext NOT NULL COMMENT '修改变更集',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
......@@ -134,9 +134,9 @@ CREATE TABLE `commit` (
# Dump of table instance
# ------------------------------------------------------------
DROP TABLE IF EXISTS `instance`;
DROP TABLE IF EXISTS `Instance`;
CREATE TABLE `instance` (
CREATE TABLE `Instance` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`AppId` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'ClusterName',
......@@ -155,9 +155,9 @@ CREATE TABLE `instance` (
# Dump of table instanceconfig
# ------------------------------------------------------------
DROP TABLE IF EXISTS `instanceconfig`;
DROP TABLE IF EXISTS `InstanceConfig`;
CREATE TABLE `instanceconfig` (
CREATE TABLE `InstanceConfig` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`InstanceId` int(11) unsigned DEFAULT NULL COMMENT 'Instance Id',
`ConfigAppId` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Config App Id',
......@@ -179,9 +179,9 @@ CREATE TABLE `instanceconfig` (
# Dump of table item
# ------------------------------------------------------------
DROP TABLE IF EXISTS `item`;
DROP TABLE IF EXISTS `Item`;
CREATE TABLE `item` (
CREATE TABLE `Item` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId',
`Key` varchar(128) NOT NULL DEFAULT 'default' COMMENT '配置项Key',
......@@ -203,9 +203,9 @@ CREATE TABLE `item` (
# Dump of table namespace
# ------------------------------------------------------------
DROP TABLE IF EXISTS `namespace`;
DROP TABLE IF EXISTS `Namespace`;
CREATE TABLE `namespace` (
CREATE TABLE `Namespace` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Cluster Name',
......@@ -225,9 +225,9 @@ CREATE TABLE `namespace` (
# Dump of table namespacelock
# ------------------------------------------------------------
DROP TABLE IF EXISTS `namespacelock`;
DROP TABLE IF EXISTS `NamespaceLock`;
CREATE TABLE `namespacelock` (
CREATE TABLE `NamespaceLock` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId',
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀',
......@@ -245,9 +245,9 @@ CREATE TABLE `namespacelock` (
# Dump of table privilege
# ------------------------------------------------------------
DROP TABLE IF EXISTS `privilege`;
DROP TABLE IF EXISTS `Privilege`;
CREATE TABLE `privilege` (
CREATE TABLE `Privilege` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Name',
`PrivilType` varchar(50) NOT NULL DEFAULT 'default' COMMENT 'PrivilType',
......@@ -267,9 +267,9 @@ CREATE TABLE `privilege` (
# Dump of table release
# ------------------------------------------------------------
DROP TABLE IF EXISTS `release`;
DROP TABLE IF EXISTS `Release`;
CREATE TABLE `release` (
CREATE TABLE `Release` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`ReleaseKey` varchar(64) NOT NULL DEFAULT '' COMMENT '发布的Key',
`Name` varchar(64) NOT NULL DEFAULT 'default' COMMENT '发布名字',
......@@ -296,9 +296,9 @@ CREATE TABLE `release` (
# Dump of table releasemessage
# ------------------------------------------------------------
DROP TABLE IF EXISTS `releasemessage`;
DROP TABLE IF EXISTS `ReleaseMessage`;
CREATE TABLE `releasemessage` (
CREATE TABLE `ReleaseMessage` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`Message` varchar(1024) NOT NULL DEFAULT '' COMMENT '发布的消息内容',
`DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
......@@ -312,9 +312,9 @@ CREATE TABLE `releasemessage` (
# Dump of table serverconfig
# ------------------------------------------------------------
DROP TABLE IF EXISTS `serverconfig`;
DROP TABLE IF EXISTS `ServerConfig`;
CREATE TABLE `serverconfig` (
CREATE TABLE `ServerConfig` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key',
`Cluster` varchar(32) NOT NULL DEFAULT 'default' COMMENT '配置对应的集群,default为不针对特定的集群',
......@@ -332,7 +332,7 @@ CREATE TABLE `serverconfig` (
# Config
# ------------------------------------------------------------
INSERT INTO `serverconfig` (`Key`, `Cluster`, `Value`, `Comment`)
INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`, `Comment`)
VALUES
('eureka.service.url', 'default', 'http://localhost:8080/eureka/', 'Eureka服务Url'),
('namespace.lock.switch', 'default', 'false', '一次发布只能有一个人修改开关'),
......
......@@ -15,9 +15,9 @@ Use ApolloPortalDB;
# Dump of table app
# ------------------------------------------------------------
DROP TABLE IF EXISTS `app`;
DROP TABLE IF EXISTS `App`;
CREATE TABLE `app` (
CREATE TABLE `App` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名',
......@@ -41,9 +41,9 @@ CREATE TABLE `app` (
# Dump of table appnamespace
# ------------------------------------------------------------
DROP TABLE IF EXISTS `appnamespace`;
DROP TABLE IF EXISTS `AppNamespace`;
CREATE TABLE `appnamespace` (
CREATE TABLE `AppNamespace` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一',
`AppId` varchar(32) NOT NULL DEFAULT '' COMMENT 'app id',
......@@ -65,9 +65,9 @@ CREATE TABLE `appnamespace` (
# Dump of table consumer
# ------------------------------------------------------------
DROP TABLE IF EXISTS `consumer`;
DROP TABLE IF EXISTS `Consumer`;
CREATE TABLE `consumer` (
CREATE TABLE `Consumer` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名',
......@@ -90,9 +90,9 @@ CREATE TABLE `consumer` (
# Dump of table consumeraudit
# ------------------------------------------------------------
DROP TABLE IF EXISTS `consumeraudit`;
DROP TABLE IF EXISTS `ConsumerAudit`;
CREATE TABLE `consumeraudit` (
CREATE TABLE `ConsumerAudit` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id',
`Uri` varchar(1024) NOT NULL DEFAULT '' COMMENT '访问的Uri',
......@@ -109,9 +109,9 @@ CREATE TABLE `consumeraudit` (
# Dump of table consumerrole
# ------------------------------------------------------------
DROP TABLE IF EXISTS `consumerrole`;
DROP TABLE IF EXISTS `ConsumerRole`;
CREATE TABLE `consumerrole` (
CREATE TABLE `ConsumerRole` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id',
`RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id',
......@@ -131,9 +131,9 @@ CREATE TABLE `consumerrole` (
# Dump of table consumertoken
# ------------------------------------------------------------
DROP TABLE IF EXISTS `consumertoken`;
DROP TABLE IF EXISTS `ConsumerToken`;
CREATE TABLE `consumertoken` (
CREATE TABLE `ConsumerToken` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'ConsumerId',
`Token` varchar(128) NOT NULL DEFAULT '' COMMENT 'token',
......@@ -151,9 +151,9 @@ CREATE TABLE `consumertoken` (
# Dump of table favorite
# ------------------------------------------------------------
DROP TABLE IF EXISTS `favorite`;
DROP TABLE IF EXISTS `Favorite`;
CREATE TABLE `favorite` (
CREATE TABLE `Favorite` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`UserId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '收藏的用户',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
......@@ -172,9 +172,9 @@ CREATE TABLE `favorite` (
# Dump of table permission
# ------------------------------------------------------------
DROP TABLE IF EXISTS `permission`;
DROP TABLE IF EXISTS `Permission`;
CREATE TABLE `permission` (
CREATE TABLE `Permission` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`PermissionType` varchar(32) NOT NULL DEFAULT '' COMMENT '权限类型',
`TargetId` varchar(256) NOT NULL DEFAULT '' COMMENT '权限对象类型',
......@@ -193,9 +193,9 @@ CREATE TABLE `permission` (
# Dump of table role
# ------------------------------------------------------------
DROP TABLE IF EXISTS `role`;
DROP TABLE IF EXISTS `Role`;
CREATE TABLE `role` (
CREATE TABLE `Role` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`RoleName` varchar(256) NOT NULL DEFAULT '' COMMENT 'Role name',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
......@@ -213,9 +213,9 @@ CREATE TABLE `role` (
# Dump of table rolepermission
# ------------------------------------------------------------
DROP TABLE IF EXISTS `rolepermission`;
DROP TABLE IF EXISTS `RolePermission`;
CREATE TABLE `rolepermission` (
CREATE TABLE `RolePermission` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id',
`PermissionId` int(10) unsigned DEFAULT NULL COMMENT 'Permission Id',
......@@ -235,9 +235,9 @@ CREATE TABLE `rolepermission` (
# Dump of table serverconfig
# ------------------------------------------------------------
DROP TABLE IF EXISTS `serverconfig`;
DROP TABLE IF EXISTS `ServerConfig`;
CREATE TABLE `serverconfig` (
CREATE TABLE `ServerConfig` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key',
`Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值',
......@@ -257,9 +257,9 @@ CREATE TABLE `serverconfig` (
# Dump of table userrole
# ------------------------------------------------------------
DROP TABLE IF EXISTS `userrole`;
DROP TABLE IF EXISTS `UserRole`;
CREATE TABLE `userrole` (
CREATE TABLE `UserRole` (
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id',
`UserId` varchar(128) DEFAULT '' COMMENT '用户身份标识',
`RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id',
......@@ -276,7 +276,7 @@ CREATE TABLE `userrole` (
# Config
# ------------------------------------------------------------
INSERT INTO `serverconfig` (`Key`, `Value`, `Comment`)
INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`)
VALUES
('apollo.portal.envs', 'dev', '可支持的环境列表'),
('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment