forked from apolloconfig/apollo-quick-start
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ CREATE TABLE `App` ( | |
`OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', | ||
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', | ||
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', | ||
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', | ||
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', | ||
PRIMARY KEY (`Id`), | ||
|
@@ -78,7 +78,7 @@ CREATE TABLE `Consumer` ( | |
`OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', | ||
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', | ||
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', | ||
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', | ||
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', | ||
PRIMARY KEY (`Id`), | ||
|
@@ -141,7 +141,7 @@ CREATE TABLE `ConsumerToken` ( | |
`Expires` datetime NOT NULL DEFAULT '2099-01-01 00:00:00' COMMENT 'token失效时间', | ||
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', | ||
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', | ||
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', | ||
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', | ||
PRIMARY KEY (`Id`), | ||
|
@@ -161,7 +161,7 @@ CREATE TABLE `Favorite` ( | |
`Position` int(32) NOT NULL DEFAULT '10000' COMMENT '收藏顺序', | ||
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', | ||
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', | ||
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', | ||
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', | ||
PRIMARY KEY (`Id`), | ||
|
@@ -275,6 +275,34 @@ CREATE TABLE `UserRole` ( | |
KEY `IX_UserId_RoleId` (`UserId`,`RoleId`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户和role的绑定表'; | ||
|
||
# Dump of table Users | ||
# ------------------------------------------------------------ | ||
|
||
DROP TABLE IF EXISTS `Users`; | ||
|
||
CREATE TABLE `Users` ( | ||
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', | ||
`Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户名', | ||
`Password` varchar(64) NOT NULL DEFAULT 'default' COMMENT '密码', | ||
`Email` varchar(64) NOT NULL DEFAULT 'default' COMMENT '邮箱地址', | ||
`Enabled` tinyint(4) DEFAULT NULL COMMENT '是否有效', | ||
PRIMARY KEY (`Id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; | ||
|
||
|
||
# Dump of table Authorities | ||
# ------------------------------------------------------------ | ||
|
||
DROP TABLE IF EXISTS `Authorities`; | ||
|
||
CREATE TABLE `Authorities` ( | ||
`Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', | ||
`Username` varchar(50) NOT NULL, | ||
`Authority` varchar(50) NOT NULL, | ||
PRIMARY KEY (`Id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
|
||
|
||
# Config | ||
# ------------------------------------------------------------ | ||
INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`) | ||
|
@@ -285,6 +313,12 @@ VALUES | |
('api.readTimeout', '10000', 'http接口read timeout'), | ||
('consumer.token.salt', 'someSalt', 'consumer token salt'); | ||
|
||
INSERT INTO `Users` (`Username`, `Password`, `Email`, `Enabled`) | ||
VALUES | ||
('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', '[email protected]', 1); | ||
|
||
INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user'); | ||
|
||
# Sample Data | ||
# ------------------------------------------------------------ | ||
INSERT INTO `App` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`) | ||
|