repo_name
stringclasses 5
values | pr_number
int64 1.52k
15.5k
| pr_title
stringlengths 8
143
| pr_description
stringlengths 0
10.2k
| author
stringlengths 3
18
| date_created
timestamp[ns, tz=UTC] | date_merged
timestamp[ns, tz=UTC] | previous_commit
stringlengths 40
40
| pr_commit
stringlengths 40
40
| query
stringlengths 11
10.2k
| filepath
stringlengths 6
220
| before_content
stringlengths 0
597M
| after_content
stringlengths 0
597M
| label
int64 -1
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/flyway/configdb/V1.1.1__extend_appId.sql | # delta schema to upgrade apollo config db from v1.7.0 to v1.8.0
Use ApolloConfigDB;
alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `Cluster` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `GrayReleaseRule` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `Instance` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `InstanceConfig` change ConfigAppId ConfigAppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id';
alter table `ReleaseHistory` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
| # delta schema to upgrade apollo config db from v1.7.0 to v1.8.0
Use ApolloConfigDB;
alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `Cluster` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `GrayReleaseRule` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `Instance` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `InstanceConfig` change ConfigAppId ConfigAppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id';
alter table `ReleaseHistory` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-configservice/src/test/resources/integration-test/test-release.sql | INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('someAppId','someAppName','someOwnerName','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('somePublicAppId','somePublicAppName','someOwnerName','[email protected]');
INSERT INTO Cluster (AppId, Name) VALUES ('someAppId', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('someAppId', 'someCluster');
INSERT INTO Cluster (AppId, Name) VALUES ('somePublicAppId', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('somePublicAppId', 'someDC');
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('someAppId', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('someAppId', 'someNamespace', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('someAppId', 'someNamespace.xml', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('someAppId', 'anotherNamespace', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('somePublicAppId', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('somePublicAppId', 'somePublicNamespace', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('somePublicAppId', 'anotherNamespace', true);
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'default', 'application');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'default', 'someNamespace.xml');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'default', 'anotherNamespace');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'someCluster', 'someNamespace');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('somePublicAppId', 'default', 'application');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('somePublicAppId', 'someDC', 'somePublicNamespace');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'default', 'somePublicNamespace');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('somePublicAppId', 'default', 'anotherNamespace');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (990, 'TEST-RELEASE-KEY1', 'INTEGRATION-TEST-DEFAULT','First Release','someAppId', 'default', 'application', '{"k1":"v1"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (991, 'TEST-RELEASE-KEY2', 'INTEGRATION-TEST-NAMESPACE','First Release','someAppId', 'someCluster', 'someNamespace', '{"k2":"v2"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (992, 'TEST-RELEASE-KEY3', 'INTEGRATION-TEST-PUBLIC-DEFAULT','First Release','somePublicAppId', 'default', 'somePublicNamespace', '{"k1":"default-v1", "k2":"default-v2"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (993, 'TEST-RELEASE-KEY4', 'INTEGRATION-TEST-PUBLIC-NAMESPACE','First Release','somePublicAppId', 'someDC', 'somePublicNamespace', '{"k1":"someDC-v1", "k2":"someDC-v2"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (989, 'TEST-RELEASE-KEY5', 'INTEGRATION-TEST-PRIVATE-CONFIG-FILE','First Release','someAppId', 'default', 'someNamespace.xml', '{"k1":"v1-file", "k2":"v2-file"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (988, 'TEST-RELEASE-KEY6', 'INTEGRATION-TEST-PRIVATE-CONFIG-FILE','First Release','someAppId', 'default', 'anotherNamespace', '{"k1":"v1-file"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (987, 'TEST-RELEASE-KEY7', 'INTEGRATION-TEST-PUBLIC-CONFIG-FILE','First Release','somePublicAppId', 'default', 'anotherNamespace', '{"k2":"v2-file"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (986, 'TEST-GRAY-RELEASE-KEY1', 'INTEGRATION-TEST-DEFAULT','Gray Release','someAppId', 'gray-branch-1', 'application', '{"k1":"v1-gray"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (985, 'TEST-GRAY-RELEASE-KEY2', 'INTEGRATION-TEST-NAMESPACE','Gray Release','somePublicAppId', 'gray-branch-2', 'somePublicNamespace', '{"k1":"gray-v1", "k2":"gray-v2"}'); | INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('someAppId','someAppName','someOwnerName','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('somePublicAppId','somePublicAppName','someOwnerName','[email protected]');
INSERT INTO Cluster (AppId, Name) VALUES ('someAppId', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('someAppId', 'someCluster');
INSERT INTO Cluster (AppId, Name) VALUES ('somePublicAppId', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('somePublicAppId', 'someDC');
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('someAppId', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('someAppId', 'someNamespace', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('someAppId', 'someNamespace.xml', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('someAppId', 'anotherNamespace', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('somePublicAppId', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('somePublicAppId', 'somePublicNamespace', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('somePublicAppId', 'anotherNamespace', true);
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'default', 'application');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'default', 'someNamespace.xml');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'default', 'anotherNamespace');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'someCluster', 'someNamespace');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('somePublicAppId', 'default', 'application');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('somePublicAppId', 'someDC', 'somePublicNamespace');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('someAppId', 'default', 'somePublicNamespace');
INSERT INTO Namespace (AppId, ClusterName, NamespaceName) VALUES ('somePublicAppId', 'default', 'anotherNamespace');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (990, 'TEST-RELEASE-KEY1', 'INTEGRATION-TEST-DEFAULT','First Release','someAppId', 'default', 'application', '{"k1":"v1"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (991, 'TEST-RELEASE-KEY2', 'INTEGRATION-TEST-NAMESPACE','First Release','someAppId', 'someCluster', 'someNamespace', '{"k2":"v2"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (992, 'TEST-RELEASE-KEY3', 'INTEGRATION-TEST-PUBLIC-DEFAULT','First Release','somePublicAppId', 'default', 'somePublicNamespace', '{"k1":"default-v1", "k2":"default-v2"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (993, 'TEST-RELEASE-KEY4', 'INTEGRATION-TEST-PUBLIC-NAMESPACE','First Release','somePublicAppId', 'someDC', 'somePublicNamespace', '{"k1":"someDC-v1", "k2":"someDC-v2"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (989, 'TEST-RELEASE-KEY5', 'INTEGRATION-TEST-PRIVATE-CONFIG-FILE','First Release','someAppId', 'default', 'someNamespace.xml', '{"k1":"v1-file", "k2":"v2-file"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (988, 'TEST-RELEASE-KEY6', 'INTEGRATION-TEST-PRIVATE-CONFIG-FILE','First Release','someAppId', 'default', 'anotherNamespace', '{"k1":"v1-file"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (987, 'TEST-RELEASE-KEY7', 'INTEGRATION-TEST-PUBLIC-CONFIG-FILE','First Release','somePublicAppId', 'default', 'anotherNamespace', '{"k2":"v2-file"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (986, 'TEST-GRAY-RELEASE-KEY1', 'INTEGRATION-TEST-DEFAULT','Gray Release','someAppId', 'gray-branch-1', 'application', '{"k1":"v1-gray"}');
INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (985, 'TEST-GRAY-RELEASE-KEY2', 'INTEGRATION-TEST-NAMESPACE','Gray Release','somePublicAppId', 'gray-branch-2', 'somePublicNamespace', '{"k1":"gray-v1", "k2":"gray-v2"}'); | -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-biz/src/test/resources/data.sql | INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'fx.apollo.config', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'fx.apollo.admin', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'fx.apollo.portal', true);
INSERT INTO AppNamespace (AppID, Name, IsPublic) VALUES ('fxhermesproducer', 'fx.hermes.producer', true);
| INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'fx.apollo.config', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'fx.apollo.admin', true);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'application', false);
INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'fx.apollo.portal', true);
INSERT INTO AppNamespace (AppID, Name, IsPublic) VALUES ('fxhermesproducer', 'fx.hermes.producer', true);
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-adminservice/src/test/resources/controller/test-release.sql | INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('someAppId','someAppName','someOwnerName','[email protected]');
INSERT INTO Cluster (AppId, Name) VALUES ('someAppId', 'default');
INSERT INTO AppNamespace (AppId, Name) VALUES ('someAppId', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (100, 'someAppId', 'default', 'application');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k1', 'v1', 'comment1');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k2', 'v2', 'comment1');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k3', 'v3', 'comment1'); | INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('someAppId','someAppName','someOwnerName','[email protected]');
INSERT INTO Cluster (AppId, Name) VALUES ('someAppId', 'default');
INSERT INTO AppNamespace (AppId, Name) VALUES ('someAppId', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (100, 'someAppId', 'default', 'application');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k1', 'v1', 'comment1');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k2', 'v2', 'comment1');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k3', 'v3', 'comment1'); | -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/flyway/portaldb/V1.1.1__extend_appId.sql | # delta schema to upgrade apollo portal db from v1.7.0 to v1.8.0
Use ApolloPortalDB;
alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
| # delta schema to upgrade apollo portal db from v1.7.0 to v1.8.0
Use ApolloPortalDB;
alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-adminservice/src/test/resources/filter/test-access-control-enabled-no-token.sql | INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`)
VALUES
('admin-service.access.control.enabled', 'default', 'true');
| INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`)
VALUES
('admin-service.access.control.enabled', 'default', 'true');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-configservice/src/test/resources/integration-test/test-release-public-default-override.sql | INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (994, 'TEST-RELEASE-KEY5', 'INTEGRATION-TEST-DEFAULT-OVERRIDE-PUBLIC','First Release','someAppId', 'default', 'somePublicNamespace', '{"k1":"override-v1"}');
| INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations)
VALUES (994, 'TEST-RELEASE-KEY5', 'INTEGRATION-TEST-DEFAULT-OVERRIDE-PUBLIC','First Release','someAppId', 'default', 'somePublicNamespace', '{"k1":"override-v1"}');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/test/resources/sql/permission/insert-test-permissions.sql | INSERT INTO `permission` (`Id`, `PermissionType`, `TargetId`) VALUES (990, 'somePermissionType', 'someTargetId');
INSERT INTO `permission` (`Id`, `PermissionType`, `TargetId`) VALUES (991, 'anotherPermissionType', 'anotherTargetId');
| INSERT INTO `permission` (`Id`, `PermissionType`, `TargetId`) VALUES (990, 'somePermissionType', 'someTargetId');
INSERT INTO `permission` (`Id`, `PermissionType`, `TargetId`) VALUES (991, 'anotherPermissionType', 'anotherTargetId');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-biz/src/test/resources/sql/release-creation-test.sql | INSERT INTO `app` ( `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('test', 'test0620-06', 'default', 'default', 'default', 'default', 0, 'default', 'default');
/* normal namespace*/
INSERT INTO `cluster` ( `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES ( 'only-master', 'test', 0, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(100, 'test', 'only-master', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(100, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(100, 'k2', 'v2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(100, 'k3', 'v3', '', 'apollo', 'apollo');
/* namespace has branch. master has items but branch has not item*/
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (101, 'default1', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(102, 'child-cluster1', 'test', 101, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(101, 'test', 'default1', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(102, 'test', 'child-cluster1', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(101, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(101, 'k2', 'v2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(101, 'k3', 'v3', '', 'apollo', 'apollo');
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default1', 'application', 'child-cluster1', '[]', 1155, 1);
/* namespace has branch. master has items and branch has item*/
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (103, 'default2', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(104, 'child-cluster2', 'test', 103, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(103, 'test', 'default2', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(104, 'test', 'child-cluster2', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(103, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(103, 'k2', 'v2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(103, 'k3', 'v3', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(104, 'k1', 'v1-1', '', 'apollo', 'apollo');
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default2', 'application', 'child-cluster2', '[]', 1155, 1);
/* namespace has branch. master has items and branch has cover item */
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (105, 'default3', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(106, 'child-cluster3', 'test', 105, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(105, 'test', 'default3', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(106, 'test', 'child-cluster3', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(105, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(105, 'k2', 'v2-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(106, 'k1', 'v1-2', '', 'apollo', 'apollo');
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(1, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default3', 'application', '{"k1":"v1","k2":"v2","k3":"v3"}', 0);
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(2, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'child-cluster3', 'application', '{"k1":"v1-1","k2":"v2","k3":"v3"}', 0);
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default3', 'application', 'child-cluster3', '[]', 1155, 1);
/*publish branch at first time */
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (107, 'default4', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(108, 'child-cluster4', 'test', 107, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(107, 'test', 'default4', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(108, 'test', 'child-cluster4', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(107, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(107, 'k2', 'v2-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(108, 'k1', 'v1-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(108, 'k4', 'v4', '', 'apollo', 'apollo');
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(3, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default4', 'application', '{"k1":"v1","k2":"v2","k3":"v3"}', 0);
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default4', 'application', 'child-cluster4', '[]', 1155, 1);
/*publish branch*/
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (109, 'default5', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'child-cluster5', 'test', 109, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(109, 'test', 'default5', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'test', 'child-cluster5', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(109, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(109, 'k2', 'v2-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'k1', 'v1-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'k4', 'v4', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'k6', 'v6', '', 'apollo', 'apollo');
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(4, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default5', 'application', '{"k1":"v1","k2":"v2","k3":"v3"}', 0);
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(5, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'child-cluster5', 'application', '{"k1":"v1-1","k2":"v2","k3":"v3","k4":"v4","k5":"v5"}', 0);
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default5', 'application', 'child-cluster5', '[]', 1155, 1);
/* rollback */
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1011, 'default6', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1012, 'child-cluster6', 'test', 1011, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1011, 'test', 'default6', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1012, 'test', 'child-cluster6', 'application', 0, 'apollo', 'apollo');
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(6, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default6', 'application', '{"k1":"v1-1","k2":"v2-1","k3":"v3"}', 0);
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(7, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default6', 'application', '{"k1":"v1","k2":"v2"}', 0);
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(8, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'child-cluster6', 'application', '{"k1":"v1-2","k2":"v2","k3":"v3"}', 0);
| INSERT INTO `app` ( `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('test', 'test0620-06', 'default', 'default', 'default', 'default', 0, 'default', 'default');
/* normal namespace*/
INSERT INTO `cluster` ( `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES ( 'only-master', 'test', 0, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(100, 'test', 'only-master', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(100, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(100, 'k2', 'v2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(100, 'k3', 'v3', '', 'apollo', 'apollo');
/* namespace has branch. master has items but branch has not item*/
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (101, 'default1', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(102, 'child-cluster1', 'test', 101, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(101, 'test', 'default1', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(102, 'test', 'child-cluster1', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(101, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(101, 'k2', 'v2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(101, 'k3', 'v3', '', 'apollo', 'apollo');
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default1', 'application', 'child-cluster1', '[]', 1155, 1);
/* namespace has branch. master has items and branch has item*/
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (103, 'default2', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(104, 'child-cluster2', 'test', 103, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(103, 'test', 'default2', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(104, 'test', 'child-cluster2', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(103, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(103, 'k2', 'v2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(103, 'k3', 'v3', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(104, 'k1', 'v1-1', '', 'apollo', 'apollo');
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default2', 'application', 'child-cluster2', '[]', 1155, 1);
/* namespace has branch. master has items and branch has cover item */
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (105, 'default3', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(106, 'child-cluster3', 'test', 105, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(105, 'test', 'default3', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(106, 'test', 'child-cluster3', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(105, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(105, 'k2', 'v2-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(106, 'k1', 'v1-2', '', 'apollo', 'apollo');
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(1, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default3', 'application', '{"k1":"v1","k2":"v2","k3":"v3"}', 0);
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(2, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'child-cluster3', 'application', '{"k1":"v1-1","k2":"v2","k3":"v3"}', 0);
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default3', 'application', 'child-cluster3', '[]', 1155, 1);
/*publish branch at first time */
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (107, 'default4', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(108, 'child-cluster4', 'test', 107, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(107, 'test', 'default4', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(108, 'test', 'child-cluster4', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(107, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(107, 'k2', 'v2-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(108, 'k1', 'v1-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(108, 'k4', 'v4', '', 'apollo', 'apollo');
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(3, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default4', 'application', '{"k1":"v1","k2":"v2","k3":"v3"}', 0);
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default4', 'application', 'child-cluster4', '[]', 1155, 1);
/*publish branch*/
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (109, 'default5', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'child-cluster5', 'test', 109, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(109, 'test', 'default5', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'test', 'child-cluster5', 'application', 0, 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(109, 'k1', 'v1', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(109, 'k2', 'v2-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'k1', 'v1-2', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'k4', 'v4', '', 'apollo', 'apollo');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1010, 'k6', 'v6', '', 'apollo', 'apollo');
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(4, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default5', 'application', '{"k1":"v1","k2":"v2","k3":"v3"}', 0);
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(5, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'child-cluster5', 'application', '{"k1":"v1-1","k2":"v2","k3":"v3","k4":"v4","k5":"v5"}', 0);
INSERT INTO `grayreleaserule` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)VALUES ('test', 'default5', 'application', 'child-cluster5', '[]', 1155, 1);
/* rollback */
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1011, 'default6', 'test', 0, 0, 'default', 'default');
INSERT INTO `cluster` (ID, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1012, 'child-cluster6', 'test', 1011, 0, 'default', 'default');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1011, 'test', 'default6', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (ID, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1012, 'test', 'child-cluster6', 'application', 0, 'apollo', 'apollo');
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(6, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default6', 'application', '{"k1":"v1-1","k2":"v2-1","k3":"v3"}', 0);
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(7, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'default6', 'application', '{"k1":"v1","k2":"v2"}', 0);
INSERT INTO `release` (`Id`, `ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES(8, '20160823102253-fc0071ddf9fd3260', '20160823101703-release', '', 'test', 'child-cluster6', 'application', '{"k1":"v1-2","k2":"v2","k3":"v3"}', 0);
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-configservice/src/test/resources/integration-test/test-release-message.sql | INSERT INTO `releasemessage` (`Id`, `Message`)
VALUES
(10, 'someAppId+default+application');
INSERT INTO `releasemessage` (`Id`, `Message`)
VALUES
(20, 'somePublicAppId+default+somePublicNamespace');
| INSERT INTO `releasemessage` (`Id`, `Message`)
VALUES
(10, 'someAppId+default+application');
INSERT INTO `releasemessage` (`Id`, `Message`)
VALUES
(20, 'somePublicAppId+default+somePublicNamespace');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/sql/delta/v170-v180/apolloconfigdb-v170-v180.sql | # delta schema to upgrade apollo config db from v1.7.0 to v1.8.0
Use ApolloConfigDB;
alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `Cluster` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `GrayReleaseRule` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `Instance` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `InstanceConfig` change ConfigAppId ConfigAppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id';
alter table `ReleaseHistory` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
| # delta schema to upgrade apollo config db from v1.7.0 to v1.8.0
Use ApolloConfigDB;
alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `Cluster` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `GrayReleaseRule` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `Instance` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
alter table `InstanceConfig` change ConfigAppId ConfigAppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id';
alter table `ReleaseHistory` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/flyway/portaldb/V1.0.0__initialization.sql | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Create Database
# ------------------------------------------------------------
CREATE DATABASE IF NOT EXISTS ApolloPortalDB DEFAULT CHARACTER SET = utf8mb4;
Use ApolloPortalDB;
# Dump of table app
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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 '应用名',
`OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id',
`OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字',
`OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_Name` (`Name`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表';
# Dump of table appnamespace
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型',
`IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共',
`Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT '' 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`),
KEY `IX_AppId` (`AppId`),
KEY `Name_AppId` (`Name`,`AppId`),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义';
# Dump of table consumer
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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 '应用名',
`OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id',
`OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字',
`OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开放API消费者';
# Dump of table consumeraudit
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`Method` varchar(16) NOT NULL DEFAULT '' COMMENT '访问的Method',
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_ConsumerId` (`ConsumerId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer审计表';
# Dump of table consumerrole
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) DEFAULT '' 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`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_RoleId` (`RoleId`),
KEY `IX_ConsumerId_RoleId` (`ConsumerId`,`RoleId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer和role的绑定表';
# Dump of table consumertoken
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
UNIQUE KEY `IX_Token` (`Token`),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer token表';
# Dump of table favorite
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `IX_UserId` (`UserId`),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='应用收藏表';
# Dump of table permission
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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 '权限对象类型',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT '' 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`),
KEY `IX_TargetId_PermissionType` (`TargetId`(191),`PermissionType`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='permission表';
# Dump of table role
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' 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`),
KEY `IX_RoleName` (`RoleName`(191)),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色表';
# Dump of table rolepermission
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) DEFAULT '' 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`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_RoleId` (`RoleId`),
KEY `IX_PermissionId` (`PermissionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色和权限的绑定表';
# Dump of table serverconfig
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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 '配置项值',
`Comment` varchar(1024) DEFAULT '' 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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `IX_Key` (`Key`),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置';
# Dump of table userrole
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) DEFAULT '' 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`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_RoleId` (`RoleId`),
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(64) NOT NULL,
`Authority` varchar(50) NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
# Config
# ------------------------------------------------------------
INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`)
VALUES
('apollo.portal.envs', 'dev', '可支持的环境列表'),
('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'),
('superAdmin', 'apollo', 'Portal超级管理员'),
('api.readTimeout', '10000', 'http接口read timeout'),
('consumer.token.salt', 'someSalt', 'consumer token salt'),
('admin.createPrivateNamespace.switch', 'true', '是否允许项目管理员创建私有namespace'),
('configView.memberOnly.envs', 'pro', '只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔');
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');
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Create Database
# ------------------------------------------------------------
CREATE DATABASE IF NOT EXISTS ApolloPortalDB DEFAULT CHARACTER SET = utf8mb4;
Use ApolloPortalDB;
# Dump of table app
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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 '应用名',
`OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id',
`OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字',
`OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_Name` (`Name`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表';
# Dump of table appnamespace
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型',
`IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共',
`Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT '' 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`),
KEY `IX_AppId` (`AppId`),
KEY `Name_AppId` (`Name`,`AppId`),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义';
# Dump of table consumer
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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 '应用名',
`OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id',
`OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字',
`OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开放API消费者';
# Dump of table consumeraudit
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`Method` varchar(16) NOT NULL DEFAULT '' COMMENT '访问的Method',
`DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_ConsumerId` (`ConsumerId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer审计表';
# Dump of table consumerrole
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) DEFAULT '' 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`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_RoleId` (`RoleId`),
KEY `IX_ConsumerId_RoleId` (`ConsumerId`,`RoleId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer和role的绑定表';
# Dump of table consumertoken
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
UNIQUE KEY `IX_Token` (`Token`),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer token表';
# Dump of table favorite
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `IX_UserId` (`UserId`),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='应用收藏表';
# Dump of table permission
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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 '权限对象类型',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT '' 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`),
KEY `IX_TargetId_PermissionType` (`TargetId`(191),`PermissionType`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='permission表';
# Dump of table role
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' 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`),
KEY `IX_RoleName` (`RoleName`(191)),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色表';
# Dump of table rolepermission
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) DEFAULT '' 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`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_RoleId` (`RoleId`),
KEY `IX_PermissionId` (`PermissionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色和权限的绑定表';
# Dump of table serverconfig
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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 '配置项值',
`Comment` varchar(1024) DEFAULT '' 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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `IX_Key` (`Key`),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置';
# Dump of table userrole
# ------------------------------------------------------------
DROP TABLE IF EXISTS `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',
`IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal',
`DataChange_CreatedBy` varchar(32) DEFAULT '' 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`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_RoleId` (`RoleId`),
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(64) NOT NULL,
`Authority` varchar(50) NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
# Config
# ------------------------------------------------------------
INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`)
VALUES
('apollo.portal.envs', 'dev', '可支持的环境列表'),
('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'),
('superAdmin', 'apollo', 'Portal超级管理员'),
('api.readTimeout', '10000', 'http接口read timeout'),
('consumer.token.salt', 'someSalt', 'consumer token salt'),
('admin.createPrivateNamespace.switch', 'true', '是否允许项目管理员创建私有namespace'),
('configView.memberOnly.envs', 'pro', '只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔');
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');
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-biz/src/test/resources/sql/clean.sql | DELETE FROM AccessKey;
DELETE FROM App;
DELETE FROM AppNamespace;
DELETE FROM Cluster;
DELETE FROM namespace;
DELETE FROM grayreleaserule;
DELETE FROM release;
DELETE FROM item;
DELETE FROM releasemessage;
DELETE FROM releasehistory;
DELETE FROM namespacelock;
DELETE FROM `commit`;
| DELETE FROM AccessKey;
DELETE FROM App;
DELETE FROM AppNamespace;
DELETE FROM Cluster;
DELETE FROM namespace;
DELETE FROM grayreleaserule;
DELETE FROM release;
DELETE FROM item;
DELETE FROM releasemessage;
DELETE FROM releasehistory;
DELETE FROM namespacelock;
DELETE FROM `commit`;
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/sql/delta/v060-v062/apolloconfigdb-v060-v062.sql | # delta schema to upgrade apollo config db from v0.6.0 to v0.6.2
Use ApolloConfigDB;
ALTER TABLE `App` DROP INDEX `NAME`;
CREATE INDEX `IX_NAME` ON App (`Name`(191));
| # delta schema to upgrade apollo config db from v0.6.0 to v0.6.2
Use ApolloConfigDB;
ALTER TABLE `App` DROP INDEX `NAME`;
CREATE INDEX `IX_NAME` ON App (`Name`(191));
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-biz/src/test/resources/sql/namespace-test.sql | INSERT INTO `app` ( `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('testApp', 'test', 'default', 'default', 'default', 'default', 0, 'default', 'default');
INSERT INTO `cluster` (`ID`, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1, 'default', 'testApp', 0, 0, 'default', 'default');
INSERT INTO `cluster` (`Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('child-cluster', 'testApp', 1, 0, 'default', 'default');
INSERT INTO `appnamespace` (`Name`, `AppId`, `Format`, `IsPublic`) VALUES ( 'application', 'testApp', 'properties', 0);
INSERT INTO `namespace` (`ID`, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1,'testApp', 'default', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (`AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('testApp', 'child-cluster', 'application', 0, 'apollo', 'apollo');
INSERT INTO `commit` (`ChangeSets`, `AppId`, `ClusterName`, `NamespaceName`)VALUES('{}', 'testApp', 'default', 'application');
INSERT INTO `commit` (`ChangeSets`, `AppId`, `ClusterName`, `NamespaceName`, `DataChange_LastTime`)VALUES('{}', 'commitTestApp', 'default', 'application', '2020-08-22 10:00:00');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `LineNum`)VALUES(1, 'k1', 'v1', '', 1);
INSERT INTO `namespacelock` (`NamespaceId`)VALUES(1);
INSERT INTO `release` (`AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES('branch-test', 'default', 'application', '{}', 0);
INSERT INTO `release` (`AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES('branch-test', 'child-cluster', 'application', '{}', 0);
INSERT INTO `releasehistory` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `ReleaseId`, `PreviousReleaseId`, `Operation`, `OperationContext`)VALUES('branch-test', 'default', 'application', 'default', 0, 0, 7, '{}');
INSERT INTO `instanceconfig` (`ID`, `InstanceId`, `ConfigAppId`, `ConfigClusterName`, `ConfigNamespaceName`, `ReleaseKey`, `ReleaseDeliveryTime`, `DataChange_CreatedTime`, `DataChange_LastTime`)
VALUES
(1, 90, 'testApp', 'default', 'application', '20160829134524-dee271ddf9fced58', '2016-08-29 13:45:24', '2016-08-30 17:03:32', '2016-10-19 11:13:47');
| INSERT INTO `app` ( `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('testApp', 'test', 'default', 'default', 'default', 'default', 0, 'default', 'default');
INSERT INTO `cluster` (`ID`, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1, 'default', 'testApp', 0, 0, 'default', 'default');
INSERT INTO `cluster` (`Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('child-cluster', 'testApp', 1, 0, 'default', 'default');
INSERT INTO `appnamespace` (`Name`, `AppId`, `Format`, `IsPublic`) VALUES ( 'application', 'testApp', 'properties', 0);
INSERT INTO `namespace` (`ID`, `AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES(1,'testApp', 'default', 'application', 0, 'apollo', 'apollo');
INSERT INTO `namespace` (`AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('testApp', 'child-cluster', 'application', 0, 'apollo', 'apollo');
INSERT INTO `commit` (`ChangeSets`, `AppId`, `ClusterName`, `NamespaceName`)VALUES('{}', 'testApp', 'default', 'application');
INSERT INTO `commit` (`ChangeSets`, `AppId`, `ClusterName`, `NamespaceName`, `DataChange_LastTime`)VALUES('{}', 'commitTestApp', 'default', 'application', '2020-08-22 10:00:00');
INSERT INTO `item` (`NamespaceId`, `Key`, `Value`, `Comment`, `LineNum`)VALUES(1, 'k1', 'v1', '', 1);
INSERT INTO `namespacelock` (`NamespaceId`)VALUES(1);
INSERT INTO `release` (`AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES('branch-test', 'default', 'application', '{}', 0);
INSERT INTO `release` (`AppId`, `ClusterName`, `NamespaceName`, `Configurations`, `IsAbandoned`)VALUES('branch-test', 'child-cluster', 'application', '{}', 0);
INSERT INTO `releasehistory` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `ReleaseId`, `PreviousReleaseId`, `Operation`, `OperationContext`)VALUES('branch-test', 'default', 'application', 'default', 0, 0, 7, '{}');
INSERT INTO `instanceconfig` (`ID`, `InstanceId`, `ConfigAppId`, `ConfigClusterName`, `ConfigNamespaceName`, `ReleaseKey`, `ReleaseDeliveryTime`, `DataChange_CreatedTime`, `DataChange_LastTime`)
VALUES
(1, 90, 'testApp', 'default', 'application', '20160829134524-dee271ddf9fced58', '2016-08-29 13:45:24', '2016-08-30 17:03:32', '2016-10-19 11:13:47');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/sql/delta/v040-v050/apolloportaldb-v040-v050.sql | # delta schema to upgrade apollo portal db from v0.4.0 to v0.5.0
Use ApolloPortalDB;
ALTER TABLE `AppNamespace` ADD KEY `IX_AppId` (`AppId`);
ALTER TABLE `App` DROP INDEX `Name`;
ALTER TABLE `App` ADD KEY `Name` (`Name`); | # delta schema to upgrade apollo portal db from v0.4.0 to v0.5.0
Use ApolloPortalDB;
ALTER TABLE `AppNamespace` ADD KEY `IX_AppId` (`AppId`);
ALTER TABLE `App` DROP INDEX `Name`;
ALTER TABLE `App` ADD KEY `Name` (`Name`); | -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-adminservice/src/test/resources/filter/test-access-control-disabled.sql | INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`)
VALUES
('admin-service.access.tokens', 'default', 'someToken,anotherToken'),
('admin-service.access.control.enabled', 'default', 'false');
| INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`)
VALUES
('admin-service.access.tokens', 'default', 'someToken,anotherToken'),
('admin-service.access.control.enabled', 'default', 'false');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/sql/delta/v060-v062/apolloportaldb-v060-v062.sql | # delta schema to upgrade apollo portal db from v0.6.0 to v0.6.2
Use ApolloPortalDB;
ALTER TABLE `App` DROP INDEX `NAME`;
CREATE INDEX `IX_NAME` ON App (`Name`(191));
| # delta schema to upgrade apollo portal db from v0.6.0 to v0.6.2
Use ApolloPortalDB;
ALTER TABLE `App` DROP INDEX `NAME`;
CREATE INDEX `IX_NAME` ON App (`Name`(191));
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-configservice/src/test/resources/data.sql | INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003171','apollo-config-service','刘一鸣','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003172','apollo-admin-service','宋顺','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003173','apollo-portal','张乐','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('fxhermesproducer','fx-hermes-producer','梁锦华','[email protected]');
INSERT INTO Cluster (AppId, Name) VALUES ('100003171', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003171', 'cluster1');
INSERT INTO Cluster (AppId, Name) VALUES ('100003172', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003172', 'cluster2');
INSERT INTO Cluster (AppId, Name) VALUES ('100003173', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003173', 'cluster3');
INSERT INTO Cluster (AppId, Name) VALUES ('fxhermesproducer', 'default');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003171', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003171', 'fx.apollo.config');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003172', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003172', 'fx.apollo.admin');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003173', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003173', 'fx.apollo.portal');
INSERT INTO AppNamespace (AppID, Name) VALUES ('fxhermesproducer', 'fx.hermes.producer');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (1, '100003171', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (2, 'fxhermesproducer', 'default', 'fx.hermes.producer');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (3, '100003172', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (4, '100003173', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (5, '100003171', 'default', 'application');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (1, 'k1', 'v1', 'comment1');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (1, 'k2', 'v2', 'comment2');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (2, 'k3', 'v3', 'comment3');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (5, 'k3', 'v4', 'comment4');
INSERT INTO RELEASE (ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations) VALUES ('TEST-RELEASE-KEY', 'REV1','First Release','100003171', 'default', 'application', '{"k1":"v1"}');
| INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003171','apollo-config-service','刘一鸣','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003172','apollo-admin-service','宋顺','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003173','apollo-portal','张乐','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('fxhermesproducer','fx-hermes-producer','梁锦华','[email protected]');
INSERT INTO Cluster (AppId, Name) VALUES ('100003171', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003171', 'cluster1');
INSERT INTO Cluster (AppId, Name) VALUES ('100003172', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003172', 'cluster2');
INSERT INTO Cluster (AppId, Name) VALUES ('100003173', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003173', 'cluster3');
INSERT INTO Cluster (AppId, Name) VALUES ('fxhermesproducer', 'default');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003171', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003171', 'fx.apollo.config');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003172', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003172', 'fx.apollo.admin');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003173', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003173', 'fx.apollo.portal');
INSERT INTO AppNamespace (AppID, Name) VALUES ('fxhermesproducer', 'fx.hermes.producer');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (1, '100003171', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (2, 'fxhermesproducer', 'default', 'fx.hermes.producer');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (3, '100003172', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (4, '100003173', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (5, '100003171', 'default', 'application');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (1, 'k1', 'v1', 'comment1');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (1, 'k2', 'v2', 'comment2');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (2, 'k3', 'v3', 'comment3');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (5, 'k3', 'v4', 'comment4');
INSERT INTO RELEASE (ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations) VALUES ('TEST-RELEASE-KEY', 'REV1','First Release','100003171', 'default', 'application', '{"k1":"v1"}');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/flyway/configdb/V1.1.0__accesskey.sql | # Dump of table accesskey
# ------------------------------------------------------------
Use ApolloConfigDB;
DROP TABLE IF EXISTS `AccessKey`;
CREATE TABLE `AccessKey` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret',
`IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥';
| # Dump of table accesskey
# ------------------------------------------------------------
Use ApolloConfigDB;
DROP TABLE IF EXISTS `AccessKey`;
CREATE TABLE `AccessKey` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret',
`IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥';
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/sql/delta/v170-v180/apolloportaldb-v170-v180.sql | # delta schema to upgrade apollo portal db from v1.7.0 to v1.8.0
Use ApolloPortalDB;
alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
| # delta schema to upgrade apollo portal db from v1.7.0 to v1.8.0
Use ApolloPortalDB;
alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/test/resources/sql/appnamespaceservice/init-appnamespace.sql | INSERT INTO `appnamespace` (`Id`, `Name`, `AppId`, `Format`, `IsPublic`, `Comment`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_CreatedTime`, `DataChange_LastModifiedBy`, `DataChange_LastTime`)
VALUES
(139, 'FX.old', '100003173', 'properties', 1, '', 0, 'zhanglea', '2016-07-11 10:00:58', 'zhanglea', '2016-07-11 10:00:58'),
(140, 'SCC.song0711-03', 'song0711-01', 'properties', 1, '', 0, 'song_s', '2016-07-11 10:04:09', 'song_s', '2016-07-11 10:04:09'),
(141, 'SCC.song0711-04', 'song0711-01', 'properties', 1, '', 0, 'song_s', '2016-07-11 10:06:29', 'song_s', '2016-07-11 10:06:29'),
(142, 'application', 'song0711-02', 'properties', 1, 'default app namespace', 0, 'song_s', '2016-07-11 11:18:24', 'song_s', '2016-07-11 11:18:24'),
(143, 'TFF.song0711-02', 'song0711-02', 'properties', 0, '', 0, 'song_s', '2016-07-11 11:15:11', 'song_s', '2016-07-11 11:15:11'),
(144, 'datasourcexml', '100003173', 'properties', 1, '', 0, 'apollo', '2016-07-11 12:08:29', 'apollo', '2016-07-11 12:08:29'),
(145, 'datasource.xml', '100003173', 'xml', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'),
(146, 'FX.private-01', '100003173', 'properties', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'),
(147, 'datasource', '100003173', 'properties', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30');
INSERT INTO `app` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)
VALUES
('1000', 'apollo-test', 'FX', '框架', 'song_s', '[email protected]', 0, 'song_s', 'song_s'),
('song0711-01', 'song0711-01', 'SCC', '框架', 'song_s', '[email protected]', 0, 'song_s', 'song_s'),
('song0711-02', 'song0711-02', 'SCC', '框架', 'song_s', '[email protected]', 0, 'song_s', 'song_s'),
('100003173', 'apollo-portal', 'FX', '框架', 'song_s', '[email protected]', 0, 'song_s', 'song_s');
| INSERT INTO `appnamespace` (`Id`, `Name`, `AppId`, `Format`, `IsPublic`, `Comment`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_CreatedTime`, `DataChange_LastModifiedBy`, `DataChange_LastTime`)
VALUES
(139, 'FX.old', '100003173', 'properties', 1, '', 0, 'zhanglea', '2016-07-11 10:00:58', 'zhanglea', '2016-07-11 10:00:58'),
(140, 'SCC.song0711-03', 'song0711-01', 'properties', 1, '', 0, 'song_s', '2016-07-11 10:04:09', 'song_s', '2016-07-11 10:04:09'),
(141, 'SCC.song0711-04', 'song0711-01', 'properties', 1, '', 0, 'song_s', '2016-07-11 10:06:29', 'song_s', '2016-07-11 10:06:29'),
(142, 'application', 'song0711-02', 'properties', 1, 'default app namespace', 0, 'song_s', '2016-07-11 11:18:24', 'song_s', '2016-07-11 11:18:24'),
(143, 'TFF.song0711-02', 'song0711-02', 'properties', 0, '', 0, 'song_s', '2016-07-11 11:15:11', 'song_s', '2016-07-11 11:15:11'),
(144, 'datasourcexml', '100003173', 'properties', 1, '', 0, 'apollo', '2016-07-11 12:08:29', 'apollo', '2016-07-11 12:08:29'),
(145, 'datasource.xml', '100003173', 'xml', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'),
(146, 'FX.private-01', '100003173', 'properties', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'),
(147, 'datasource', '100003173', 'properties', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30');
INSERT INTO `app` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)
VALUES
('1000', 'apollo-test', 'FX', '框架', 'song_s', '[email protected]', 0, 'song_s', 'song_s'),
('song0711-01', 'song0711-01', 'SCC', '框架', 'song_s', '[email protected]', 0, 'song_s', 'song_s'),
('song0711-02', 'song0711-02', 'SCC', '框架', 'song_s', '[email protected]', 0, 'song_s', 'song_s'),
('100003173', 'apollo-portal', 'FX', '框架', 'song_s', '[email protected]', 0, 'song_s', 'song_s');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/sql/delta/v040-v050/apolloconfigdb-v040-v050.sql | # delta schema to upgrade apollo config db from v0.4.0 to v0.5.0
Use ApolloConfigDB;
DROP TABLE `Privilege`;
ALTER TABLE `Release` DROP `Status`;
ALTER TABLE `Namespace` ADD KEY `IX_NamespaceName` (`NamespaceName`(191));
ALTER TABLE `Cluster` ADD KEY `IX_ParentClusterId` (`ParentClusterId`);
ALTER TABLE `AppNamespace` ADD KEY `IX_AppId` (`AppId`);
ALTER TABLE `App` DROP INDEX `Name`;
ALTER TABLE `App` ADD KEY `Name` (`Name`); | # delta schema to upgrade apollo config db from v0.4.0 to v0.5.0
Use ApolloConfigDB;
DROP TABLE `Privilege`;
ALTER TABLE `Release` DROP `Status`;
ALTER TABLE `Namespace` ADD KEY `IX_NamespaceName` (`NamespaceName`(191));
ALTER TABLE `Cluster` ADD KEY `IX_ParentClusterId` (`ParentClusterId`);
ALTER TABLE `AppNamespace` ADD KEY `IX_AppId` (`AppId`);
ALTER TABLE `App` DROP INDEX `Name`;
ALTER TABLE `App` ADD KEY `Name` (`Name`); | -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/test/resources/sql/permission/insert-test-consumerroles.sql | INSERT INTO `consumerrole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)
VALUES (890, 1, 990, 'someOperator', 'someOperator');
INSERT INTO `consumerrole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)
VALUES (891, 2, 990, 'someOperator', 'someOperator');
| INSERT INTO `consumerrole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)
VALUES (890, 1, 990, 'someOperator', 'someOperator');
INSERT INTO `consumerrole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)
VALUES (891, 2, 990, 'someOperator', 'someOperator');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/sql/delta/v080-v090/apolloportaldb-v080-v090.sql | # delta schema to upgrade apollo portal db from v0.8.0 to v0.9.0
Use ApolloPortalDB;
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='用户表';
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;
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');
| # delta schema to upgrade apollo portal db from v0.8.0 to v0.9.0
Use ApolloPortalDB;
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='用户表';
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;
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');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/test/resources/sql/cleanup.sql | delete from Permission;
delete from Role;
delete from RolePermission;
delete from UserRole;
delete from AppNamespace;
DELETE FROM Favorite;
DELETE FROM ServerConfig;
DELETE FROM App;
| delete from Permission;
delete from Role;
delete from RolePermission;
delete from UserRole;
delete from AppNamespace;
DELETE FROM Favorite;
DELETE FROM ServerConfig;
DELETE FROM App;
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-configservice/src/test/resources/integration-test/test-gray-release.sql | INSERT INTO GrayReleaseRule (`Id`, `AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)
VALUES
(1, 'someAppId', 'default', 'application', 'gray-branch-1', '[{"clientAppId":"someAppId","clientIpList":["1.1.1.1"]}]', 986, 1);
INSERT INTO GrayReleaseRule (`Id`, `AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)
VALUES
(2, 'somePublicAppId', 'default', 'somePublicNamespace', 'gray-branch-2', '[{"clientAppId":"someAppId","clientIpList":["1.1.1.1"]}]', 985, 1);
| INSERT INTO GrayReleaseRule (`Id`, `AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)
VALUES
(1, 'someAppId', 'default', 'application', 'gray-branch-1', '[{"clientAppId":"someAppId","clientIpList":["1.1.1.1"]}]', 986, 1);
INSERT INTO GrayReleaseRule (`Id`, `AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)
VALUES
(2, 'somePublicAppId', 'default', 'somePublicNamespace', 'gray-branch-2', '[{"clientAppId":"someAppId","clientIpList":["1.1.1.1"]}]', 985, 1);
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-adminservice/src/test/resources/data.sql | INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003171','apollo-config-service','刘一鸣','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003172','apollo-admin-service','宋顺','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003173','apollo-portal','张乐','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('fxhermesproducer','fx-hermes-producer','梁锦华','[email protected]');
INSERT INTO Cluster (AppId, Name) VALUES ('100003171', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003171', 'cluster1');
INSERT INTO Cluster (AppId, Name) VALUES ('100003172', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003172', 'cluster2');
INSERT INTO Cluster (AppId, Name) VALUES ('100003173', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003173', 'cluster3');
INSERT INTO Cluster (AppId, Name) VALUES ('fxhermesproducer', 'default');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003171', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003171', 'fx.apollo.config');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003172', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003172', 'fx.apollo.admin');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003173', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003173', 'fx.apollo.portal');
INSERT INTO AppNamespace (AppID, Name) VALUES ('fxhermesproducer', 'fx.hermes.producer');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (1, '100003171', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (5, '100003171', 'cluster1', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (2, 'fxhermesproducer', 'default', 'fx.hermes.producer');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (3, '100003172', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (4, '100003173', 'default', 'application');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (1, 'k1', 'v1', 'comment1');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (1, 'k2', 'v2', 'comment2');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (2, 'k3', 'v3', 'comment3');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment, LineNum) VALUES (5, 'k1', 'v4', 'comment4',1);
INSERT INTO RELEASE (ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations) VALUES ('TEST-RELEASE-KEY', 'REV1','First Release','100003171', 'default', 'application', '{"k1":"v1"}');
| INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003171','apollo-config-service','刘一鸣','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003172','apollo-admin-service','宋顺','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003173','apollo-portal','张乐','[email protected]');
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('fxhermesproducer','fx-hermes-producer','梁锦华','[email protected]');
INSERT INTO Cluster (AppId, Name) VALUES ('100003171', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003171', 'cluster1');
INSERT INTO Cluster (AppId, Name) VALUES ('100003172', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003172', 'cluster2');
INSERT INTO Cluster (AppId, Name) VALUES ('100003173', 'default');
INSERT INTO Cluster (AppId, Name) VALUES ('100003173', 'cluster3');
INSERT INTO Cluster (AppId, Name) VALUES ('fxhermesproducer', 'default');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003171', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003171', 'fx.apollo.config');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003172', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003172', 'fx.apollo.admin');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003173', 'application');
INSERT INTO AppNamespace (AppId, Name) VALUES ('100003173', 'fx.apollo.portal');
INSERT INTO AppNamespace (AppID, Name) VALUES ('fxhermesproducer', 'fx.hermes.producer');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (1, '100003171', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (5, '100003171', 'cluster1', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (2, 'fxhermesproducer', 'default', 'fx.hermes.producer');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (3, '100003172', 'default', 'application');
INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (4, '100003173', 'default', 'application');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (1, 'k1', 'v1', 'comment1');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (1, 'k2', 'v2', 'comment2');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (2, 'k3', 'v3', 'comment3');
INSERT INTO Item (NamespaceId, `Key`, Value, Comment, LineNum) VALUES (5, 'k1', 'v4', 'comment4',1);
INSERT INTO RELEASE (ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations) VALUES ('TEST-RELEASE-KEY', 'REV1','First Release','100003171', 'default', 'application', '{"k1":"v1"}');
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./scripts/sql/delta/v151-v160/apolloconfigdb-v151-v160.sql | # delta schema to upgrade apollo config db from v1.5.1 to v1.6.0
Use ApolloConfigDB;
CREATE TABLE `AccessKey` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret',
`IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥'; | # delta schema to upgrade apollo config db from v1.5.1 to v1.6.0
Use ApolloConfigDB;
CREATE TABLE `AccessKey` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID',
`Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret',
`IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled',
`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 COMMENT '创建时间',
`DataChange_LastModifiedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
KEY `AppId` (`AppId`(191)),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥'; | -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/PortalSettings.java | package com.ctrip.framework.apollo.portal.component;
import com.ctrip.framework.apollo.portal.environment.PortalMetaDomainService;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.core.utils.ApolloThreadFactory;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.component.config.PortalConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.actuate.health.Health;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@Component
public class PortalSettings {
private static final Logger logger = LoggerFactory.getLogger(PortalSettings.class);
private static final int HEALTH_CHECK_INTERVAL = 10 * 1000;
private final ApplicationContext applicationContext;
private final PortalConfig portalConfig;
private final PortalMetaDomainService portalMetaDomainService;
private List<Env> allEnvs = new ArrayList<>();
//mark env up or down
private Map<Env, Boolean> envStatusMark = new ConcurrentHashMap<>();
public PortalSettings(
final ApplicationContext applicationContext,
final PortalConfig portalConfig,
final PortalMetaDomainService portalMetaDomainService
) {
this.applicationContext = applicationContext;
this.portalConfig = portalConfig;
this.portalMetaDomainService = portalMetaDomainService;
}
@PostConstruct
private void postConstruct() {
allEnvs = portalConfig.portalSupportedEnvs();
for (Env env : allEnvs) {
envStatusMark.put(env, true);
}
ScheduledExecutorService
healthCheckService =
Executors.newScheduledThreadPool(1, ApolloThreadFactory.create("EnvHealthChecker", true));
healthCheckService
.scheduleWithFixedDelay(new HealthCheckTask(applicationContext), 1000, HEALTH_CHECK_INTERVAL,
TimeUnit.MILLISECONDS);
}
public List<Env> getAllEnvs() {
return allEnvs;
}
public List<Env> getActiveEnvs() {
List<Env> activeEnvs = new LinkedList<>();
for (Env env : allEnvs) {
if (envStatusMark.get(env)) {
activeEnvs.add(env);
}
}
return activeEnvs;
}
public boolean isEnvActive(Env env) {
Boolean mark = envStatusMark.get(env);
return mark != null && mark;
}
private class HealthCheckTask implements Runnable {
private static final int ENV_DOWN_THRESHOLD = 2;
private Map<Env, Integer> healthCheckFailedCounter = new HashMap<>();
private AdminServiceAPI.HealthAPI healthAPI;
public HealthCheckTask(ApplicationContext context) {
healthAPI = context.getBean(AdminServiceAPI.HealthAPI.class);
for (Env env : allEnvs) {
healthCheckFailedCounter.put(env, 0);
}
}
public void run() {
for (Env env : allEnvs) {
try {
if (isUp(env)) {
//revive
if (!envStatusMark.get(env)) {
envStatusMark.put(env, true);
healthCheckFailedCounter.put(env, 0);
logger.info("Env revived because env health check success. env: {}", env);
}
} else {
logger.error("Env health check failed, maybe because of admin server down. env: {}, meta server address: {}", env,
portalMetaDomainService.getDomain(env));
handleEnvDown(env);
}
} catch (Exception e) {
logger.error("Env health check failed, maybe because of meta server down "
+ "or configure wrong meta server address. env: {}, meta server address: {}", env,
portalMetaDomainService.getDomain(env), e);
handleEnvDown(env);
}
}
}
private boolean isUp(Env env) {
Health health = healthAPI.health(env);
return "UP".equals(health.getStatus().getCode());
}
private void handleEnvDown(Env env) {
int failedTimes = healthCheckFailedCounter.get(env);
healthCheckFailedCounter.put(env, ++failedTimes);
if (!envStatusMark.get(env)) {
logger.error("Env is down. env: {}, failed times: {}, meta server address: {}", env, failedTimes,
portalMetaDomainService.getDomain(env));
} else {
if (failedTimes >= ENV_DOWN_THRESHOLD) {
envStatusMark.put(env, false);
logger.error("Env is down because health check failed for {} times, "
+ "which equals to down threshold. env: {}, meta server address: {}", ENV_DOWN_THRESHOLD, env,
portalMetaDomainService.getDomain(env));
} else {
logger.error(
"Env health check failed for {} times which less than down threshold. down threshold:{}, env: {}, meta server address: {}",
failedTimes, ENV_DOWN_THRESHOLD, env, portalMetaDomainService.getDomain(env));
}
}
}
}
}
| package com.ctrip.framework.apollo.portal.component;
import com.ctrip.framework.apollo.portal.environment.PortalMetaDomainService;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.core.utils.ApolloThreadFactory;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.component.config.PortalConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.actuate.health.Health;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@Component
public class PortalSettings {
private static final Logger logger = LoggerFactory.getLogger(PortalSettings.class);
private static final int HEALTH_CHECK_INTERVAL = 10 * 1000;
private final ApplicationContext applicationContext;
private final PortalConfig portalConfig;
private final PortalMetaDomainService portalMetaDomainService;
private List<Env> allEnvs = new ArrayList<>();
//mark env up or down
private Map<Env, Boolean> envStatusMark = new ConcurrentHashMap<>();
public PortalSettings(
final ApplicationContext applicationContext,
final PortalConfig portalConfig,
final PortalMetaDomainService portalMetaDomainService
) {
this.applicationContext = applicationContext;
this.portalConfig = portalConfig;
this.portalMetaDomainService = portalMetaDomainService;
}
@PostConstruct
private void postConstruct() {
allEnvs = portalConfig.portalSupportedEnvs();
for (Env env : allEnvs) {
envStatusMark.put(env, true);
}
ScheduledExecutorService
healthCheckService =
Executors.newScheduledThreadPool(1, ApolloThreadFactory.create("EnvHealthChecker", true));
healthCheckService
.scheduleWithFixedDelay(new HealthCheckTask(applicationContext), 1000, HEALTH_CHECK_INTERVAL,
TimeUnit.MILLISECONDS);
}
public List<Env> getAllEnvs() {
return allEnvs;
}
public List<Env> getActiveEnvs() {
List<Env> activeEnvs = new LinkedList<>();
for (Env env : allEnvs) {
if (envStatusMark.get(env)) {
activeEnvs.add(env);
}
}
return activeEnvs;
}
public boolean isEnvActive(Env env) {
Boolean mark = envStatusMark.get(env);
return mark != null && mark;
}
private class HealthCheckTask implements Runnable {
private static final int ENV_DOWN_THRESHOLD = 2;
private Map<Env, Integer> healthCheckFailedCounter = new HashMap<>();
private AdminServiceAPI.HealthAPI healthAPI;
public HealthCheckTask(ApplicationContext context) {
healthAPI = context.getBean(AdminServiceAPI.HealthAPI.class);
for (Env env : allEnvs) {
healthCheckFailedCounter.put(env, 0);
}
}
public void run() {
for (Env env : allEnvs) {
try {
if (isUp(env)) {
//revive
if (!envStatusMark.get(env)) {
envStatusMark.put(env, true);
healthCheckFailedCounter.put(env, 0);
logger.info("Env revived because env health check success. env: {}", env);
}
} else {
logger.error("Env health check failed, maybe because of admin server down. env: {}, meta server address: {}", env,
portalMetaDomainService.getDomain(env));
handleEnvDown(env);
}
} catch (Exception e) {
logger.error("Env health check failed, maybe because of meta server down "
+ "or configure wrong meta server address. env: {}, meta server address: {}", env,
portalMetaDomainService.getDomain(env), e);
handleEnvDown(env);
}
}
}
private boolean isUp(Env env) {
Health health = healthAPI.health(env);
return "UP".equals(health.getStatus().getCode());
}
private void handleEnvDown(Env env) {
int failedTimes = healthCheckFailedCounter.get(env);
healthCheckFailedCounter.put(env, ++failedTimes);
if (!envStatusMark.get(env)) {
logger.error("Env is down. env: {}, failed times: {}, meta server address: {}", env, failedTimes,
portalMetaDomainService.getDomain(env));
} else {
if (failedTimes >= ENV_DOWN_THRESHOLD) {
envStatusMark.put(env, false);
logger.error("Env is down because health check failed for {} times, "
+ "which equals to down threshold. env: {}, meta server address: {}", ENV_DOWN_THRESHOLD, env,
portalMetaDomainService.getDomain(env));
} else {
logger.error(
"Env health check failed for {} times which less than down threshold. down threshold:{}, env: {}, meta server address: {}",
failedTimes, ENV_DOWN_THRESHOLD, env, portalMetaDomainService.getDomain(env));
}
}
}
}
}
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-assembly/src/test/resources/logback-test.xml | <?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>utf-8</charset>
<Pattern>[%p] %c - %m%n</Pattern>
</encoder>
</appender>
<logger name="org.springframework.test" level="OFF" />
<root level="WARN">
<appender-ref ref="CONSOLE" />
</root>
</configuration>
| <?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>utf-8</charset>
<Pattern>[%p] %c - %m%n</Pattern>
</encoder>
</appender>
<logger name="org.springframework.test" level="OFF" />
<root level="WARN">
<appender-ref ref="CONSOLE" />
</root>
</configuration>
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/defaultimpl/DefaultSsoHeartbeatHandler.java | package com.ctrip.framework.apollo.portal.spi.defaultimpl;
import com.ctrip.framework.apollo.portal.spi.SsoHeartbeatHandler;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author Jason Song([email protected])
*/
public class DefaultSsoHeartbeatHandler implements SsoHeartbeatHandler {
@Override
public void doHeartbeat(HttpServletRequest request, HttpServletResponse response) {
try {
response.sendRedirect("default_sso_heartbeat.html");
} catch (IOException e) {
}
}
}
| package com.ctrip.framework.apollo.portal.spi.defaultimpl;
import com.ctrip.framework.apollo.portal.spi.SsoHeartbeatHandler;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author Jason Song([email protected])
*/
public class DefaultSsoHeartbeatHandler implements SsoHeartbeatHandler {
@Override
public void doHeartbeat(HttpServletRequest request, HttpServletResponse response) {
try {
response.sendRedirect("default_sso_heartbeat.html");
} catch (IOException e) {
}
}
}
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/main/resources/static/views/component/entrance.html | <a class="list-group-item hover" href="{{href}}">
<div class="row icon-text icon-{{imgSrc}}">
<p class="btn-title">{{title}}</p>
</div>
</a>
| <a class="list-group-item hover" href="{{href}}">
<div class="row icon-text icon-{{imgSrc}}">
<p class="btn-title">{{title}}</p>
</div>
</a>
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/AdminServiceAPI.java | package com.ctrip.framework.apollo.portal.api;
import com.ctrip.framework.apollo.common.dto.*;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.google.common.base.Joiner;
import org.springframework.boot.actuate.health.Health;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import java.util.*;
@Service
public class AdminServiceAPI {
@Service
public static class HealthAPI extends API {
public Health health(Env env) {
return restTemplate.get(env, "/health", Health.class);
}
}
@Service
public static class AppAPI extends API {
public AppDTO loadApp(Env env, String appId) {
return restTemplate.get(env, "apps/{appId}", AppDTO.class, appId);
}
public AppDTO createApp(Env env, AppDTO app) {
return restTemplate.post(env, "apps", app, AppDTO.class);
}
public void updateApp(Env env, AppDTO app) {
restTemplate.put(env, "apps/{appId}", app, app.getAppId());
}
public void deleteApp(Env env, String appId, String operator) {
restTemplate.delete(env, "/apps/{appId}?operator={operator}", appId, operator);
}
}
@Service
public static class NamespaceAPI extends API {
private ParameterizedTypeReference<Map<String, Boolean>>
typeReference = new ParameterizedTypeReference<Map<String, Boolean>>() {
};
public List<NamespaceDTO> findNamespaceByCluster(String appId, Env env, String clusterName) {
NamespaceDTO[] namespaceDTOs = restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces",
NamespaceDTO[].class, appId,
clusterName);
return Arrays.asList(namespaceDTOs);
}
public NamespaceDTO loadNamespace(String appId, Env env, String clusterName,
String namespaceName) {
return
restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}",
NamespaceDTO.class, appId, clusterName, namespaceName);
}
public NamespaceDTO findPublicNamespaceForAssociatedNamespace(Env env, String appId, String clusterName,
String namespaceName) {
return
restTemplate
.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace",
NamespaceDTO.class, appId, clusterName, namespaceName);
}
public NamespaceDTO createNamespace(Env env, NamespaceDTO namespace) {
return restTemplate
.post(env, "apps/{appId}/clusters/{clusterName}/namespaces", namespace, NamespaceDTO.class,
namespace.getAppId(), namespace.getClusterName());
}
public AppNamespaceDTO createAppNamespace(Env env, AppNamespaceDTO appNamespace) {
return restTemplate
.post(env, "apps/{appId}/appnamespaces", appNamespace, AppNamespaceDTO.class, appNamespace.getAppId());
}
public AppNamespaceDTO createMissingAppNamespace(Env env, AppNamespaceDTO appNamespace) {
return restTemplate
.post(env, "apps/{appId}/appnamespaces?silentCreation=true", appNamespace, AppNamespaceDTO.class,
appNamespace.getAppId());
}
public List<AppNamespaceDTO> getAppNamespaces(String appId, Env env) {
AppNamespaceDTO[] appNamespaceDTOs = restTemplate.get(env, "apps/{appId}/appnamespaces", AppNamespaceDTO[].class, appId);
return Arrays.asList(appNamespaceDTOs);
}
public void deleteNamespace(Env env, String appId, String clusterName, String namespaceName, String operator) {
restTemplate
.delete(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}?operator={operator}", appId,
clusterName,
namespaceName, operator);
}
public Map<String, Boolean> getNamespacePublishInfo(Env env, String appId) {
return restTemplate.get(env, "apps/{appId}/namespaces/publish_info", typeReference, appId).getBody();
}
public List<NamespaceDTO> getPublicAppNamespaceAllNamespaces(Env env, String publicNamespaceName,
int page, int size) {
NamespaceDTO[] namespaceDTOs =
restTemplate.get(env, "/appnamespaces/{publicNamespaceName}/namespaces?page={page}&size={size}",
NamespaceDTO[].class, publicNamespaceName, page, size);
return Arrays.asList(namespaceDTOs);
}
public int countPublicAppNamespaceAssociatedNamespaces(Env env, String publicNamesapceName) {
Integer count =
restTemplate.get(env, "/appnamespaces/{publicNamespaceName}/associated-namespaces/count", Integer.class,
publicNamesapceName);
return count == null ? 0 : count;
}
public void deleteAppNamespace(Env env, String appId, String namespaceName, String operator) {
restTemplate.delete(env, "/apps/{appId}/appnamespaces/{namespaceName}?operator={operator}", appId, namespaceName,
operator);
}
}
@Service
public static class ItemAPI extends API {
public List<ItemDTO> findItems(String appId, Env env, String clusterName, String namespaceName) {
ItemDTO[] itemDTOs =
restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items",
ItemDTO[].class, appId, clusterName, namespaceName);
return Arrays.asList(itemDTOs);
}
public List<ItemDTO> findDeletedItems(String appId, Env env, String clusterName, String namespaceName) {
ItemDTO[] itemDTOs =
restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/deleted",
ItemDTO[].class, appId, clusterName, namespaceName);
return Arrays.asList(itemDTOs);
}
public ItemDTO loadItem(Env env, String appId, String clusterName, String namespaceName, String key) {
return restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}",
ItemDTO.class, appId, clusterName, namespaceName, key);
}
public ItemDTO loadItemById(Env env, long itemId) {
return restTemplate.get(env, "items/{itemId}", ItemDTO.class, itemId);
}
public void updateItemsByChangeSet(String appId, Env env, String clusterName, String namespace,
ItemChangeSets changeSets) {
restTemplate.post(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/itemset",
changeSets, Void.class, appId, clusterName, namespace);
}
public void updateItem(String appId, Env env, String clusterName, String namespace, long itemId, ItemDTO item) {
restTemplate.put(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{itemId}",
item, appId, clusterName, namespace, itemId);
}
public ItemDTO createItem(String appId, Env env, String clusterName, String namespace, ItemDTO item) {
return restTemplate.post(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items",
item, ItemDTO.class, appId, clusterName, namespace);
}
public void deleteItem(Env env, long itemId, String operator) {
restTemplate.delete(env, "items/{itemId}?operator={operator}", itemId, operator);
}
}
@Service
public static class ClusterAPI extends API {
public List<ClusterDTO> findClustersByApp(String appId, Env env) {
ClusterDTO[] clusterDTOs = restTemplate.get(env, "apps/{appId}/clusters", ClusterDTO[].class,
appId);
return Arrays.asList(clusterDTOs);
}
public ClusterDTO loadCluster(String appId, Env env, String clusterName) {
return restTemplate.get(env, "apps/{appId}/clusters/{clusterName}", ClusterDTO.class,
appId, clusterName);
}
public boolean isClusterUnique(String appId, Env env, String clusterName) {
return restTemplate
.get(env, "apps/{appId}/cluster/{clusterName}/unique", Boolean.class,
appId, clusterName);
}
public ClusterDTO create(Env env, ClusterDTO cluster) {
return restTemplate.post(env, "apps/{appId}/clusters", cluster, ClusterDTO.class,
cluster.getAppId());
}
public void delete(Env env, String appId, String clusterName, String operator) {
restTemplate.delete(env, "apps/{appId}/clusters/{clusterName}?operator={operator}", appId, clusterName, operator);
}
}
@Service
public static class AccessKeyAPI extends API {
public AccessKeyDTO create(Env env, AccessKeyDTO accessKey) {
return restTemplate.post(env, "apps/{appId}/accesskeys",
accessKey, AccessKeyDTO.class, accessKey.getAppId());
}
public List<AccessKeyDTO> findByAppId(Env env, String appId) {
AccessKeyDTO[] accessKeys = restTemplate.get(env, "apps/{appId}/accesskeys",
AccessKeyDTO[].class, appId);
return Arrays.asList(accessKeys);
}
public void delete(Env env, String appId, long id, String operator) {
restTemplate.delete(env, "apps/{appId}/accesskeys/{id}?operator={operator}",
appId, id, operator);
}
public void enable(Env env, String appId, long id, String operator) {
restTemplate.put(env, "apps/{appId}/accesskeys/{id}/enable?operator={operator}",
null, appId, id, operator);
}
public void disable(Env env, String appId, long id, String operator) {
restTemplate.put(env, "apps/{appId}/accesskeys/{id}/disable?operator={operator}",
null, appId, id, operator);
}
}
@Service
public static class ReleaseAPI extends API {
private static final Joiner JOINER = Joiner.on(",");
public ReleaseDTO loadRelease(Env env, long releaseId) {
return restTemplate.get(env, "releases/{releaseId}", ReleaseDTO.class, releaseId);
}
public List<ReleaseDTO> findReleaseByIds(Env env, Set<Long> releaseIds) {
if (CollectionUtils.isEmpty(releaseIds)) {
return Collections.emptyList();
}
ReleaseDTO[]
releases =
restTemplate.get(env, "/releases?releaseIds={releaseIds}", ReleaseDTO[].class, JOINER.join(releaseIds));
return Arrays.asList(releases);
}
public List<ReleaseDTO> findAllReleases(String appId, Env env, String clusterName, String namespaceName, int page,
int size) {
ReleaseDTO[] releaseDTOs = restTemplate.get(
env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all?page={page}&size={size}",
ReleaseDTO[].class,
appId, clusterName, namespaceName, page, size);
return Arrays.asList(releaseDTOs);
}
public List<ReleaseDTO> findActiveReleases(String appId, Env env, String clusterName, String namespaceName,
int page,
int size) {
ReleaseDTO[] releaseDTOs = restTemplate.get(
env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active?page={page}&size={size}",
ReleaseDTO[].class,
appId, clusterName, namespaceName, page, size);
return Arrays.asList(releaseDTOs);
}
public ReleaseDTO loadLatestRelease(String appId, Env env, String clusterName,
String namespace) {
ReleaseDTO releaseDTO = restTemplate
.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest",
ReleaseDTO.class, appId, clusterName, namespace);
return releaseDTO;
}
public ReleaseDTO createRelease(String appId, Env env, String clusterName, String namespace,
String releaseName, String releaseComment, String operator,
boolean isEmergencyPublish) {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.parseMediaType(MediaType.APPLICATION_FORM_URLENCODED_VALUE + ";charset=UTF-8"));
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>();
parameters.add("name", releaseName);
parameters.add("comment", releaseComment);
parameters.add("operator", operator);
parameters.add("isEmergencyPublish", String.valueOf(isEmergencyPublish));
HttpEntity<MultiValueMap<String, String>> entity =
new HttpEntity<>(parameters, headers);
ReleaseDTO response = restTemplate.post(
env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases", entity,
ReleaseDTO.class, appId, clusterName, namespace);
return response;
}
public ReleaseDTO createGrayDeletionRelease(String appId, Env env, String clusterName, String namespace,
String releaseName, String releaseComment, String operator,
boolean isEmergencyPublish, Set<String> grayDelKeys) {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.parseMediaType(MediaType.APPLICATION_FORM_URLENCODED_VALUE + ";charset=UTF-8"));
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>();
parameters.add("releaseName", releaseName);
parameters.add("comment", releaseComment);
parameters.add("operator", operator);
parameters.add("isEmergencyPublish", String.valueOf(isEmergencyPublish));
grayDelKeys.forEach(key -> parameters.add("grayDelKeys",key));
HttpEntity<MultiValueMap<String, String>> entity =
new HttpEntity<>(parameters, headers);
ReleaseDTO response = restTemplate.post(
env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/gray-del-releases", entity,
ReleaseDTO.class, appId, clusterName, namespace);
return response;
}
public ReleaseDTO updateAndPublish(String appId, Env env, String clusterName, String namespace,
String releaseName, String releaseComment, String branchName,
boolean isEmergencyPublish, boolean deleteBranch, ItemChangeSets changeSets) {
return restTemplate.post(env,
"apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/updateAndPublish?"
+ "releaseName={releaseName}&releaseComment={releaseComment}&branchName={branchName}"
+ "&deleteBranch={deleteBranch}&isEmergencyPublish={isEmergencyPublish}",
changeSets, ReleaseDTO.class, appId, clusterName, namespace,
releaseName, releaseComment, branchName, deleteBranch, isEmergencyPublish);
}
public void rollback(Env env, long releaseId, String operator) {
restTemplate.put(env,
"releases/{releaseId}/rollback?operator={operator}",
null, releaseId, operator);
}
public void rollbackTo(Env env, long releaseId, long toReleaseId, String operator) {
restTemplate.put(env,
"releases/{releaseId}/rollback?toReleaseId={toReleaseId}&operator={operator}",
null, releaseId, toReleaseId, operator);
}
}
@Service
public static class CommitAPI extends API {
public List<CommitDTO> find(String appId, Env env, String clusterName, String namespaceName, int page, int size) {
CommitDTO[] commitDTOs = restTemplate.get(env,
"apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/commit?page={page}&size={size}",
CommitDTO[].class,
appId, clusterName, namespaceName, page, size);
return Arrays.asList(commitDTOs);
}
}
@Service
public static class NamespaceLockAPI extends API {
public NamespaceLockDTO getNamespaceLockOwner(String appId, Env env, String clusterName, String namespaceName) {
return restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock",
NamespaceLockDTO.class,
appId, clusterName, namespaceName);
}
}
@Service
public static class InstanceAPI extends API {
private Joiner joiner = Joiner.on(",");
private ParameterizedTypeReference<PageDTO<InstanceDTO>>
pageInstanceDtoType =
new ParameterizedTypeReference<PageDTO<InstanceDTO>>() {
};
public PageDTO<InstanceDTO> getByRelease(Env env, long releaseId, int page, int size) {
ResponseEntity<PageDTO<InstanceDTO>>
entity =
restTemplate
.get(env, "/instances/by-release?releaseId={releaseId}&page={page}&size={size}", pageInstanceDtoType,
releaseId, page, size);
return entity.getBody();
}
public List<InstanceDTO> getByReleasesNotIn(String appId, Env env, String clusterName, String namespaceName,
Set<Long> releaseIds) {
InstanceDTO[]
instanceDTOs =
restTemplate.get(env,
"/instances/by-namespace-and-releases-not-in?appId={appId}&clusterName={clusterName}&namespaceName={namespaceName}&releaseIds={releaseIds}",
InstanceDTO[].class, appId, clusterName, namespaceName, joiner.join(releaseIds));
return Arrays.asList(instanceDTOs);
}
public PageDTO<InstanceDTO> getByNamespace(String appId, Env env, String clusterName, String namespaceName,
String instanceAppId,
int page, int size) {
ResponseEntity<PageDTO<InstanceDTO>>
entity =
restTemplate.get(env,
"/instances/by-namespace?appId={appId}"
+ "&clusterName={clusterName}&namespaceName={namespaceName}&instanceAppId={instanceAppId}"
+ "&page={page}&size={size}",
pageInstanceDtoType, appId, clusterName, namespaceName, instanceAppId, page, size);
return entity.getBody();
}
public int getInstanceCountByNamespace(String appId, Env env, String clusterName, String namespaceName) {
Integer
count =
restTemplate.get(env,
"/instances/by-namespace/count?appId={appId}&clusterName={clusterName}&namespaceName={namespaceName}",
Integer.class, appId, clusterName, namespaceName);
if (count == null) {
return 0;
}
return count;
}
}
@Service
public static class NamespaceBranchAPI extends API {
public NamespaceDTO createBranch(String appId, Env env, String clusterName,
String namespaceName, String operator) {
return restTemplate
.post(env, "/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches?operator={operator}",
null, NamespaceDTO.class, appId, clusterName, namespaceName, operator);
}
public NamespaceDTO findBranch(String appId, Env env, String clusterName,
String namespaceName) {
return restTemplate.get(env, "/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches",
NamespaceDTO.class, appId, clusterName, namespaceName);
}
public GrayReleaseRuleDTO findBranchGrayRules(String appId, Env env, String clusterName,
String namespaceName, String branchName) {
return restTemplate
.get(env, "/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules",
GrayReleaseRuleDTO.class, appId, clusterName, namespaceName, branchName);
}
public void updateBranchGrayRules(String appId, Env env, String clusterName,
String namespaceName, String branchName, GrayReleaseRuleDTO rules) {
restTemplate
.put(env, "/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules",
rules, appId, clusterName, namespaceName, branchName);
}
public void deleteBranch(String appId, Env env, String clusterName,
String namespaceName, String branchName, String operator) {
restTemplate.delete(env,
"/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}?operator={operator}",
appId, clusterName, namespaceName, branchName, operator);
}
}
@Service
public static class ReleaseHistoryAPI extends API {
private ParameterizedTypeReference<PageDTO<ReleaseHistoryDTO>> type =
new ParameterizedTypeReference<PageDTO<ReleaseHistoryDTO>>() {
};
public PageDTO<ReleaseHistoryDTO> findReleaseHistoriesByNamespace(String appId, Env env, String clusterName,
String namespaceName, int page, int size) {
return restTemplate.get(env,
"/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories?page={page}&size={size}",
type, appId, clusterName, namespaceName, page, size).getBody();
}
public PageDTO<ReleaseHistoryDTO> findByReleaseIdAndOperation(Env env, long releaseId, int operation, int page,
int size) {
return restTemplate.get(env,
"/releases/histories/by_release_id_and_operation?releaseId={releaseId}&operation={operation}&page={page}&size={size}",
type, releaseId, operation, page, size).getBody();
}
public PageDTO<ReleaseHistoryDTO> findByPreviousReleaseIdAndOperation(Env env, long previousReleaseId,
int operation, int page, int size) {
return restTemplate.get(env,
"/releases/histories/by_previous_release_id_and_operation?previousReleaseId={releaseId}&operation={operation}&page={page}&size={size}",
type, previousReleaseId, operation, page, size).getBody();
}
}
}
| package com.ctrip.framework.apollo.portal.api;
import com.ctrip.framework.apollo.common.dto.*;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.google.common.base.Joiner;
import org.springframework.boot.actuate.health.Health;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import java.util.*;
@Service
public class AdminServiceAPI {
@Service
public static class HealthAPI extends API {
public Health health(Env env) {
return restTemplate.get(env, "/health", Health.class);
}
}
@Service
public static class AppAPI extends API {
public AppDTO loadApp(Env env, String appId) {
return restTemplate.get(env, "apps/{appId}", AppDTO.class, appId);
}
public AppDTO createApp(Env env, AppDTO app) {
return restTemplate.post(env, "apps", app, AppDTO.class);
}
public void updateApp(Env env, AppDTO app) {
restTemplate.put(env, "apps/{appId}", app, app.getAppId());
}
public void deleteApp(Env env, String appId, String operator) {
restTemplate.delete(env, "/apps/{appId}?operator={operator}", appId, operator);
}
}
@Service
public static class NamespaceAPI extends API {
private ParameterizedTypeReference<Map<String, Boolean>>
typeReference = new ParameterizedTypeReference<Map<String, Boolean>>() {
};
public List<NamespaceDTO> findNamespaceByCluster(String appId, Env env, String clusterName) {
NamespaceDTO[] namespaceDTOs = restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces",
NamespaceDTO[].class, appId,
clusterName);
return Arrays.asList(namespaceDTOs);
}
public NamespaceDTO loadNamespace(String appId, Env env, String clusterName,
String namespaceName) {
return
restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}",
NamespaceDTO.class, appId, clusterName, namespaceName);
}
public NamespaceDTO findPublicNamespaceForAssociatedNamespace(Env env, String appId, String clusterName,
String namespaceName) {
return
restTemplate
.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace",
NamespaceDTO.class, appId, clusterName, namespaceName);
}
public NamespaceDTO createNamespace(Env env, NamespaceDTO namespace) {
return restTemplate
.post(env, "apps/{appId}/clusters/{clusterName}/namespaces", namespace, NamespaceDTO.class,
namespace.getAppId(), namespace.getClusterName());
}
public AppNamespaceDTO createAppNamespace(Env env, AppNamespaceDTO appNamespace) {
return restTemplate
.post(env, "apps/{appId}/appnamespaces", appNamespace, AppNamespaceDTO.class, appNamespace.getAppId());
}
public AppNamespaceDTO createMissingAppNamespace(Env env, AppNamespaceDTO appNamespace) {
return restTemplate
.post(env, "apps/{appId}/appnamespaces?silentCreation=true", appNamespace, AppNamespaceDTO.class,
appNamespace.getAppId());
}
public List<AppNamespaceDTO> getAppNamespaces(String appId, Env env) {
AppNamespaceDTO[] appNamespaceDTOs = restTemplate.get(env, "apps/{appId}/appnamespaces", AppNamespaceDTO[].class, appId);
return Arrays.asList(appNamespaceDTOs);
}
public void deleteNamespace(Env env, String appId, String clusterName, String namespaceName, String operator) {
restTemplate
.delete(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}?operator={operator}", appId,
clusterName,
namespaceName, operator);
}
public Map<String, Boolean> getNamespacePublishInfo(Env env, String appId) {
return restTemplate.get(env, "apps/{appId}/namespaces/publish_info", typeReference, appId).getBody();
}
public List<NamespaceDTO> getPublicAppNamespaceAllNamespaces(Env env, String publicNamespaceName,
int page, int size) {
NamespaceDTO[] namespaceDTOs =
restTemplate.get(env, "/appnamespaces/{publicNamespaceName}/namespaces?page={page}&size={size}",
NamespaceDTO[].class, publicNamespaceName, page, size);
return Arrays.asList(namespaceDTOs);
}
public int countPublicAppNamespaceAssociatedNamespaces(Env env, String publicNamesapceName) {
Integer count =
restTemplate.get(env, "/appnamespaces/{publicNamespaceName}/associated-namespaces/count", Integer.class,
publicNamesapceName);
return count == null ? 0 : count;
}
public void deleteAppNamespace(Env env, String appId, String namespaceName, String operator) {
restTemplate.delete(env, "/apps/{appId}/appnamespaces/{namespaceName}?operator={operator}", appId, namespaceName,
operator);
}
}
@Service
public static class ItemAPI extends API {
public List<ItemDTO> findItems(String appId, Env env, String clusterName, String namespaceName) {
ItemDTO[] itemDTOs =
restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items",
ItemDTO[].class, appId, clusterName, namespaceName);
return Arrays.asList(itemDTOs);
}
public List<ItemDTO> findDeletedItems(String appId, Env env, String clusterName, String namespaceName) {
ItemDTO[] itemDTOs =
restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/deleted",
ItemDTO[].class, appId, clusterName, namespaceName);
return Arrays.asList(itemDTOs);
}
public ItemDTO loadItem(Env env, String appId, String clusterName, String namespaceName, String key) {
return restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}",
ItemDTO.class, appId, clusterName, namespaceName, key);
}
public ItemDTO loadItemById(Env env, long itemId) {
return restTemplate.get(env, "items/{itemId}", ItemDTO.class, itemId);
}
public void updateItemsByChangeSet(String appId, Env env, String clusterName, String namespace,
ItemChangeSets changeSets) {
restTemplate.post(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/itemset",
changeSets, Void.class, appId, clusterName, namespace);
}
public void updateItem(String appId, Env env, String clusterName, String namespace, long itemId, ItemDTO item) {
restTemplate.put(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{itemId}",
item, appId, clusterName, namespace, itemId);
}
public ItemDTO createItem(String appId, Env env, String clusterName, String namespace, ItemDTO item) {
return restTemplate.post(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items",
item, ItemDTO.class, appId, clusterName, namespace);
}
public void deleteItem(Env env, long itemId, String operator) {
restTemplate.delete(env, "items/{itemId}?operator={operator}", itemId, operator);
}
}
@Service
public static class ClusterAPI extends API {
public List<ClusterDTO> findClustersByApp(String appId, Env env) {
ClusterDTO[] clusterDTOs = restTemplate.get(env, "apps/{appId}/clusters", ClusterDTO[].class,
appId);
return Arrays.asList(clusterDTOs);
}
public ClusterDTO loadCluster(String appId, Env env, String clusterName) {
return restTemplate.get(env, "apps/{appId}/clusters/{clusterName}", ClusterDTO.class,
appId, clusterName);
}
public boolean isClusterUnique(String appId, Env env, String clusterName) {
return restTemplate
.get(env, "apps/{appId}/cluster/{clusterName}/unique", Boolean.class,
appId, clusterName);
}
public ClusterDTO create(Env env, ClusterDTO cluster) {
return restTemplate.post(env, "apps/{appId}/clusters", cluster, ClusterDTO.class,
cluster.getAppId());
}
public void delete(Env env, String appId, String clusterName, String operator) {
restTemplate.delete(env, "apps/{appId}/clusters/{clusterName}?operator={operator}", appId, clusterName, operator);
}
}
@Service
public static class AccessKeyAPI extends API {
public AccessKeyDTO create(Env env, AccessKeyDTO accessKey) {
return restTemplate.post(env, "apps/{appId}/accesskeys",
accessKey, AccessKeyDTO.class, accessKey.getAppId());
}
public List<AccessKeyDTO> findByAppId(Env env, String appId) {
AccessKeyDTO[] accessKeys = restTemplate.get(env, "apps/{appId}/accesskeys",
AccessKeyDTO[].class, appId);
return Arrays.asList(accessKeys);
}
public void delete(Env env, String appId, long id, String operator) {
restTemplate.delete(env, "apps/{appId}/accesskeys/{id}?operator={operator}",
appId, id, operator);
}
public void enable(Env env, String appId, long id, String operator) {
restTemplate.put(env, "apps/{appId}/accesskeys/{id}/enable?operator={operator}",
null, appId, id, operator);
}
public void disable(Env env, String appId, long id, String operator) {
restTemplate.put(env, "apps/{appId}/accesskeys/{id}/disable?operator={operator}",
null, appId, id, operator);
}
}
@Service
public static class ReleaseAPI extends API {
private static final Joiner JOINER = Joiner.on(",");
public ReleaseDTO loadRelease(Env env, long releaseId) {
return restTemplate.get(env, "releases/{releaseId}", ReleaseDTO.class, releaseId);
}
public List<ReleaseDTO> findReleaseByIds(Env env, Set<Long> releaseIds) {
if (CollectionUtils.isEmpty(releaseIds)) {
return Collections.emptyList();
}
ReleaseDTO[]
releases =
restTemplate.get(env, "/releases?releaseIds={releaseIds}", ReleaseDTO[].class, JOINER.join(releaseIds));
return Arrays.asList(releases);
}
public List<ReleaseDTO> findAllReleases(String appId, Env env, String clusterName, String namespaceName, int page,
int size) {
ReleaseDTO[] releaseDTOs = restTemplate.get(
env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all?page={page}&size={size}",
ReleaseDTO[].class,
appId, clusterName, namespaceName, page, size);
return Arrays.asList(releaseDTOs);
}
public List<ReleaseDTO> findActiveReleases(String appId, Env env, String clusterName, String namespaceName,
int page,
int size) {
ReleaseDTO[] releaseDTOs = restTemplate.get(
env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active?page={page}&size={size}",
ReleaseDTO[].class,
appId, clusterName, namespaceName, page, size);
return Arrays.asList(releaseDTOs);
}
public ReleaseDTO loadLatestRelease(String appId, Env env, String clusterName,
String namespace) {
ReleaseDTO releaseDTO = restTemplate
.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest",
ReleaseDTO.class, appId, clusterName, namespace);
return releaseDTO;
}
public ReleaseDTO createRelease(String appId, Env env, String clusterName, String namespace,
String releaseName, String releaseComment, String operator,
boolean isEmergencyPublish) {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.parseMediaType(MediaType.APPLICATION_FORM_URLENCODED_VALUE + ";charset=UTF-8"));
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>();
parameters.add("name", releaseName);
parameters.add("comment", releaseComment);
parameters.add("operator", operator);
parameters.add("isEmergencyPublish", String.valueOf(isEmergencyPublish));
HttpEntity<MultiValueMap<String, String>> entity =
new HttpEntity<>(parameters, headers);
ReleaseDTO response = restTemplate.post(
env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases", entity,
ReleaseDTO.class, appId, clusterName, namespace);
return response;
}
public ReleaseDTO createGrayDeletionRelease(String appId, Env env, String clusterName, String namespace,
String releaseName, String releaseComment, String operator,
boolean isEmergencyPublish, Set<String> grayDelKeys) {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.parseMediaType(MediaType.APPLICATION_FORM_URLENCODED_VALUE + ";charset=UTF-8"));
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>();
parameters.add("releaseName", releaseName);
parameters.add("comment", releaseComment);
parameters.add("operator", operator);
parameters.add("isEmergencyPublish", String.valueOf(isEmergencyPublish));
grayDelKeys.forEach(key -> parameters.add("grayDelKeys",key));
HttpEntity<MultiValueMap<String, String>> entity =
new HttpEntity<>(parameters, headers);
ReleaseDTO response = restTemplate.post(
env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/gray-del-releases", entity,
ReleaseDTO.class, appId, clusterName, namespace);
return response;
}
public ReleaseDTO updateAndPublish(String appId, Env env, String clusterName, String namespace,
String releaseName, String releaseComment, String branchName,
boolean isEmergencyPublish, boolean deleteBranch, ItemChangeSets changeSets) {
return restTemplate.post(env,
"apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/updateAndPublish?"
+ "releaseName={releaseName}&releaseComment={releaseComment}&branchName={branchName}"
+ "&deleteBranch={deleteBranch}&isEmergencyPublish={isEmergencyPublish}",
changeSets, ReleaseDTO.class, appId, clusterName, namespace,
releaseName, releaseComment, branchName, deleteBranch, isEmergencyPublish);
}
public void rollback(Env env, long releaseId, String operator) {
restTemplate.put(env,
"releases/{releaseId}/rollback?operator={operator}",
null, releaseId, operator);
}
public void rollbackTo(Env env, long releaseId, long toReleaseId, String operator) {
restTemplate.put(env,
"releases/{releaseId}/rollback?toReleaseId={toReleaseId}&operator={operator}",
null, releaseId, toReleaseId, operator);
}
}
@Service
public static class CommitAPI extends API {
public List<CommitDTO> find(String appId, Env env, String clusterName, String namespaceName, int page, int size) {
CommitDTO[] commitDTOs = restTemplate.get(env,
"apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/commit?page={page}&size={size}",
CommitDTO[].class,
appId, clusterName, namespaceName, page, size);
return Arrays.asList(commitDTOs);
}
}
@Service
public static class NamespaceLockAPI extends API {
public NamespaceLockDTO getNamespaceLockOwner(String appId, Env env, String clusterName, String namespaceName) {
return restTemplate.get(env, "apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock",
NamespaceLockDTO.class,
appId, clusterName, namespaceName);
}
}
@Service
public static class InstanceAPI extends API {
private Joiner joiner = Joiner.on(",");
private ParameterizedTypeReference<PageDTO<InstanceDTO>>
pageInstanceDtoType =
new ParameterizedTypeReference<PageDTO<InstanceDTO>>() {
};
public PageDTO<InstanceDTO> getByRelease(Env env, long releaseId, int page, int size) {
ResponseEntity<PageDTO<InstanceDTO>>
entity =
restTemplate
.get(env, "/instances/by-release?releaseId={releaseId}&page={page}&size={size}", pageInstanceDtoType,
releaseId, page, size);
return entity.getBody();
}
public List<InstanceDTO> getByReleasesNotIn(String appId, Env env, String clusterName, String namespaceName,
Set<Long> releaseIds) {
InstanceDTO[]
instanceDTOs =
restTemplate.get(env,
"/instances/by-namespace-and-releases-not-in?appId={appId}&clusterName={clusterName}&namespaceName={namespaceName}&releaseIds={releaseIds}",
InstanceDTO[].class, appId, clusterName, namespaceName, joiner.join(releaseIds));
return Arrays.asList(instanceDTOs);
}
public PageDTO<InstanceDTO> getByNamespace(String appId, Env env, String clusterName, String namespaceName,
String instanceAppId,
int page, int size) {
ResponseEntity<PageDTO<InstanceDTO>>
entity =
restTemplate.get(env,
"/instances/by-namespace?appId={appId}"
+ "&clusterName={clusterName}&namespaceName={namespaceName}&instanceAppId={instanceAppId}"
+ "&page={page}&size={size}",
pageInstanceDtoType, appId, clusterName, namespaceName, instanceAppId, page, size);
return entity.getBody();
}
public int getInstanceCountByNamespace(String appId, Env env, String clusterName, String namespaceName) {
Integer
count =
restTemplate.get(env,
"/instances/by-namespace/count?appId={appId}&clusterName={clusterName}&namespaceName={namespaceName}",
Integer.class, appId, clusterName, namespaceName);
if (count == null) {
return 0;
}
return count;
}
}
@Service
public static class NamespaceBranchAPI extends API {
public NamespaceDTO createBranch(String appId, Env env, String clusterName,
String namespaceName, String operator) {
return restTemplate
.post(env, "/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches?operator={operator}",
null, NamespaceDTO.class, appId, clusterName, namespaceName, operator);
}
public NamespaceDTO findBranch(String appId, Env env, String clusterName,
String namespaceName) {
return restTemplate.get(env, "/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches",
NamespaceDTO.class, appId, clusterName, namespaceName);
}
public GrayReleaseRuleDTO findBranchGrayRules(String appId, Env env, String clusterName,
String namespaceName, String branchName) {
return restTemplate
.get(env, "/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules",
GrayReleaseRuleDTO.class, appId, clusterName, namespaceName, branchName);
}
public void updateBranchGrayRules(String appId, Env env, String clusterName,
String namespaceName, String branchName, GrayReleaseRuleDTO rules) {
restTemplate
.put(env, "/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules",
rules, appId, clusterName, namespaceName, branchName);
}
public void deleteBranch(String appId, Env env, String clusterName,
String namespaceName, String branchName, String operator) {
restTemplate.delete(env,
"/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}?operator={operator}",
appId, clusterName, namespaceName, branchName, operator);
}
}
@Service
public static class ReleaseHistoryAPI extends API {
private ParameterizedTypeReference<PageDTO<ReleaseHistoryDTO>> type =
new ParameterizedTypeReference<PageDTO<ReleaseHistoryDTO>>() {
};
public PageDTO<ReleaseHistoryDTO> findReleaseHistoriesByNamespace(String appId, Env env, String clusterName,
String namespaceName, int page, int size) {
return restTemplate.get(env,
"/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories?page={page}&size={size}",
type, appId, clusterName, namespaceName, page, size).getBody();
}
public PageDTO<ReleaseHistoryDTO> findByReleaseIdAndOperation(Env env, long releaseId, int operation, int page,
int size) {
return restTemplate.get(env,
"/releases/histories/by_release_id_and_operation?releaseId={releaseId}&operation={operation}&page={page}&size={size}",
type, releaseId, operation, page, size).getBody();
}
public PageDTO<ReleaseHistoryDTO> findByPreviousReleaseIdAndOperation(Env env, long previousReleaseId,
int operation, int page, int size) {
return restTemplate.get(env,
"/releases/histories/by_previous_release_id_and_operation?previousReleaseId={releaseId}&operation={operation}&page={page}&size={size}",
type, previousReleaseId, operation, page, size).getBody();
}
}
}
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/AuthFilterConfiguration.java | package com.ctrip.framework.apollo.portal.spi.configuration;
import com.ctrip.framework.apollo.openapi.filter.ConsumerAuthenticationFilter;
import com.ctrip.framework.apollo.openapi.util.ConsumerAuditUtil;
import com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AuthFilterConfiguration {
@Bean
public FilterRegistrationBean openApiAuthenticationFilter(ConsumerAuthUtil consumerAuthUtil,
ConsumerAuditUtil consumerAuditUtil) {
FilterRegistrationBean openApiFilter = new FilterRegistrationBean();
openApiFilter.setFilter(new ConsumerAuthenticationFilter(consumerAuthUtil, consumerAuditUtil));
openApiFilter.addUrlPatterns("/openapi/*");
return openApiFilter;
}
}
| package com.ctrip.framework.apollo.portal.spi.configuration;
import com.ctrip.framework.apollo.openapi.filter.ConsumerAuthenticationFilter;
import com.ctrip.framework.apollo.openapi.util.ConsumerAuditUtil;
import com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AuthFilterConfiguration {
@Bean
public FilterRegistrationBean openApiAuthenticationFilter(ConsumerAuthUtil consumerAuthUtil,
ConsumerAuditUtil consumerAuditUtil) {
FilterRegistrationBean openApiFilter = new FilterRegistrationBean();
openApiFilter.setFilter(new ConsumerAuthenticationFilter(consumerAuthUtil, consumerAuditUtil));
openApiFilter.addUrlPatterns("/openapi/*");
return openApiFilter;
}
}
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./apollo-portal/src/main/resources/static/scripts/services/ReleaseService.js | appService.service('ReleaseService', ['$resource', '$q','AppUtil', function ($resource, $q,AppUtil) {
var resource = $resource('', {}, {
get: {
method: 'GET',
url: AppUtil.prefixPath() + '/envs/:env/releases/:releaseId'
},
find_all_releases: {
method: 'GET',
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/all',
isArray: true
},
find_active_releases: {
method: 'GET',
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/active',
isArray: true
},
compare: {
method: 'GET',
url: AppUtil.prefixPath() + '/envs/:env/releases/compare'
},
release: {
method: 'POST',
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases'
},
gray_release: {
method: 'POST',
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/releases'
},
rollback: {
method: 'PUT',
url: AppUtil.prefixPath() + "/envs/:env/releases/:releaseId/rollback"
}
});
function createRelease(appId, env, clusterName, namespaceName, releaseTitle, comment, isEmergencyPublish) {
var d = $q.defer();
resource.release({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName
}, {
releaseTitle: releaseTitle,
releaseComment: comment,
isEmergencyPublish: isEmergencyPublish
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function createGrayRelease(appId, env, clusterName, namespaceName, branchName, releaseTitle, comment, isEmergencyPublish) {
var d = $q.defer();
resource.gray_release({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName,
branchName: branchName
}, {
releaseTitle: releaseTitle,
releaseComment: comment,
isEmergencyPublish: isEmergencyPublish
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function get(env, releaseId) {
var d = $q.defer();
resource.get({
env: env,
releaseId: releaseId
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function findAllReleases(appId, env, clusterName, namespaceName, page, size) {
var d = $q.defer();
resource.find_all_releases({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName,
page: page,
size: size
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function findActiveReleases(appId, env, clusterName, namespaceName, page, size) {
var d = $q.defer();
resource.find_active_releases({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName,
page: page,
size: size
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function findLatestActiveRelease(appId, env, clusterName, namespaceName) {
var d = $q.defer();
resource.find_active_releases({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName,
page: 0,
size: 1
}, function (result) {
if (result && result.length) {
d.resolve(result[0]);
}
d.resolve(undefined);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function compare(env, baseReleaseId, toCompareReleaseId) {
var d = $q.defer();
resource.compare({
env: env,
baseReleaseId: baseReleaseId,
toCompareReleaseId: toCompareReleaseId
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function rollback(env, releaseId) {
var d = $q.defer();
resource.rollback({
env: env,
releaseId: releaseId
}, {}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
}
);
return d.promise;
}
function rollbackTo(env, releaseId, toReleaseId) {
var d = $q.defer();
resource.rollback({
env: env,
releaseId: releaseId,
toReleaseId: toReleaseId
}, {}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
}
);
return d.promise;
}
return {
publish: createRelease,
grayPublish: createGrayRelease,
get: get,
findAllRelease: findAllReleases,
findActiveReleases: findActiveReleases,
findLatestActiveRelease: findLatestActiveRelease,
compare: compare,
rollback: rollback,
rollbackTo: rollbackTo
}
}]);
| appService.service('ReleaseService', ['$resource', '$q','AppUtil', function ($resource, $q,AppUtil) {
var resource = $resource('', {}, {
get: {
method: 'GET',
url: AppUtil.prefixPath() + '/envs/:env/releases/:releaseId'
},
find_all_releases: {
method: 'GET',
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/all',
isArray: true
},
find_active_releases: {
method: 'GET',
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/active',
isArray: true
},
compare: {
method: 'GET',
url: AppUtil.prefixPath() + '/envs/:env/releases/compare'
},
release: {
method: 'POST',
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases'
},
gray_release: {
method: 'POST',
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/releases'
},
rollback: {
method: 'PUT',
url: AppUtil.prefixPath() + "/envs/:env/releases/:releaseId/rollback"
}
});
function createRelease(appId, env, clusterName, namespaceName, releaseTitle, comment, isEmergencyPublish) {
var d = $q.defer();
resource.release({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName
}, {
releaseTitle: releaseTitle,
releaseComment: comment,
isEmergencyPublish: isEmergencyPublish
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function createGrayRelease(appId, env, clusterName, namespaceName, branchName, releaseTitle, comment, isEmergencyPublish) {
var d = $q.defer();
resource.gray_release({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName,
branchName: branchName
}, {
releaseTitle: releaseTitle,
releaseComment: comment,
isEmergencyPublish: isEmergencyPublish
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function get(env, releaseId) {
var d = $q.defer();
resource.get({
env: env,
releaseId: releaseId
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function findAllReleases(appId, env, clusterName, namespaceName, page, size) {
var d = $q.defer();
resource.find_all_releases({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName,
page: page,
size: size
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function findActiveReleases(appId, env, clusterName, namespaceName, page, size) {
var d = $q.defer();
resource.find_active_releases({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName,
page: page,
size: size
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function findLatestActiveRelease(appId, env, clusterName, namespaceName) {
var d = $q.defer();
resource.find_active_releases({
appId: appId,
env: env,
clusterName: clusterName,
namespaceName: namespaceName,
page: 0,
size: 1
}, function (result) {
if (result && result.length) {
d.resolve(result[0]);
}
d.resolve(undefined);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function compare(env, baseReleaseId, toCompareReleaseId) {
var d = $q.defer();
resource.compare({
env: env,
baseReleaseId: baseReleaseId,
toCompareReleaseId: toCompareReleaseId
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
});
return d.promise;
}
function rollback(env, releaseId) {
var d = $q.defer();
resource.rollback({
env: env,
releaseId: releaseId
}, {}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
}
);
return d.promise;
}
function rollbackTo(env, releaseId, toReleaseId) {
var d = $q.defer();
resource.rollback({
env: env,
releaseId: releaseId,
toReleaseId: toReleaseId
}, {}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
}
);
return d.promise;
}
return {
publish: createRelease,
grayPublish: createGrayRelease,
get: get,
findAllRelease: findAllReleases,
findActiveReleases: findActiveReleases,
findLatestActiveRelease: findLatestActiveRelease,
compare: compare,
rollback: rollback,
rollbackTo: rollbackTo
}
}]);
| -1 |
apolloconfig/apollo | 3,552 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64 |
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | vdiskg | 2021-02-19T02:08:15Z | 2021-03-13T11:28:50Z | 1f5b3648fb6fbb1fa9833b04fe9d7ed32eee9932 | d6e0b017a6fce1b45d4aa577fd838113f24eb337 | extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.
extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64
1. make the limit of `DataChange_CreatedBy`, `DataChange_LastModifiedBy` equals to `ApolloPortalDB`.`Users`.`Username`
2. oidc subject (oidc user's identification) usually have more than 32 character | ./doc/images/override-public-namespace-item-done.png | PNG
IHDR х IDATxx_I'zlKwc16=@HGʟ^ Z`z5+Ef~y$$Y;#gfw3բA (%PJ@ (%@+(--,K:)?PJ@ (%PJ@ mVUJ@ (%PJ@ (T塿PJ@ (%PJ m#PJ@ (%PJ@ %.PJ@ (%PmD@hdPJ@ (%PJ.WݟK (%P-'/dѾERTQ$>K<OņiOz7CEEEl
h W$8HnnnP!88X%**opΖCui!!!Cdd_\kp7¹GъI*@z~SJ@ (%ZNocWK`+OGrdZʴ:!.
xIxxx0"<11Q\.{ԁӌ咙){6bд4L@W
eee%}'puזu̽!߯_TmY{PJ@ (nFLX(a!arKTwY ŕŲ`kJFc;܈P 4
GOvd<x 0E7YPP ݁ѷiشkw5FUJ@ (%ZNS.yy
tui )uHPdfP0;yon]D-w[}
b7TUUMݥ)6gS5
%PJ@ (%VG51۷oE;w14c̘1uƧ3?`ǎf68Æ
3_7n4禷]'֭[8yX]͛ ݰDo۶m 2dȐɇT (%PJ@ (!pTAK/}7lҥKM|!GeJ
ZVQ>|xEF2Ӏ ЯZ֮]kw0+P̙3eڴi~j
;+MJtR mPJ@ (%8 eU)3shL93x-Zd&#DWZ%w3WLo(sOovAW^ ̷2oVooرc-VoG]ޖmϑŴ2a9R$({;յU KxдU@+{,ՏE (% b2&&FfϞmĝqPJ'O'p߾}zj3?7iz;b9rZߖnIIP|v_rYϯIk== 䅀[RRy|_~),oMGʕ+fDoxJ:SGYmW=&l?O9ΕCm~-=>}o[)EeU觓o?=j v
c''1.|oOoɔ2Amq
MS (%`x=FDK|XYUu7-2P`DGJ^E^sl`:#CYکmخR'昶,CG=Mp:(
Û&&Nhn2?_}wp駟䛄&oa#J#}N:Ɉ2!N.\h!/a%}Yg%)))KȍcggrŔ駟N<;b!k֬16@O>dw_|!6m2B4z䁸={Q̵l{6E<|IaB+4aaݺu>2wɦ}W-[&˦<X2ymEz9Ԋ=
S/t@R'vG@3gNj?:V&Mdۼ#aSN9˥W^ri/,%eUx/<E
qHRtWHiGl'C\_Z)؈-**O"byԡ &/@).jG|]A5窓IKI}$6\?h&Dog|h4O
%Wwܽn9&[#DYc
5p;[[[xFyvvIc?l1}SL1\Yo[g5Ͽ۞xNcP{<g͚%k5FC,&L9sB;:
pXWs=֖~>҇zHnVo{9m<Ȑ\OZ;
{ꫯ6HK;.KMM5;Z6aDgeَfp:װpX=F3zCwK8!-`uJ;"m`mKg$9w;ѡE9i&{104Zb7'p aV B\~IEZUBPn,Bba19Qx㑤,G)?s0{3
F/ȷqHaue3:poٲE&3xMö.>d*Q9eixׄ|q4xr!pB2;F48^<m{y/tI 3Ϙz "+yB0r/g?>0|GˎRW&A~6N(Ê*L,p<.yuEkYswɋ_푓!?J[w@>Z!nW[PZ)zI^{$!-=o<Ny=
TM>+=(')Ӈ&ʀHVZn,ݞ#_n͒r q?4Pq{$-
TJ@ |+X-Pt*rPJ${,w.>Q}̻Gy-ʖC[㮖(w<!),1cd@ s>}Opso*rI"g6MƏ/1όb:1t'<;ʕzW耈Ϛy@bUFill2l{t;lѣG[8h ÇL8m~c'b"@9❤M3 <a?j)O
k_!ɂ-GC{q`#z.0:ÀX>(7|@{6& O<Ѵw}h!p}vxbckZոq@ {9%N$.0:uh4pGwzj/&o 0< |