Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit 96a2e35

Browse files
committed
normalize all profiles default data loads
1 parent 2f989dc commit 96a2e35

2 files changed

Lines changed: 29 additions & 18 deletions

File tree

etc/prepopulatesql_localhost8080.sql

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,24 @@ INSERT INTO retail_customers (username, first_name, last_name, password, enabled
2020
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('charles', 'Charles', 'Babbage', 'koala', TRUE, 'ROLE_USER');
2121
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('john', 'John', 'von Neumann', 'koala', TRUE, 'ROLE_USER');
2222
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('marian', 'Marian', 'Rejewski', 'koala', TRUE, 'ROLE_USER');
23+
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('vinny', 'Vint', 'Koala', 'koala', TRUE, 'ROLE_USER');
24+
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('johnny', 'Johnny', 'Koala', 'koala', TRUE, 'ROLE_USER');
25+
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('don', 'Don', 'Koala', 'koala', TRUE, 'ROLE_USER');
26+
27+
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('marty', 'Marty', 'Koala', 'koala', TRUE, 'ROLE_USER');
28+
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('ron', 'Ron', 'Koala', 'koala', TRUE, 'ROLE_USER');
29+
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('dave', 'Dave', 'Koala', 'koala', TRUE, 'ROLE_USER');
30+
31+
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('net0', 'net0', 'NIST', 'koala', TRUE, 'ROLE_USER');
32+
2333
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('grace', 'Grace', 'Hopper', 'koala', TRUE, 'ROLE_CUSTODIAN');
2434

2535
/* Add application_information */
2636
INSERT INTO application_information (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`,`authorizationServerAuthorizationEndpoint`,`authorizationServerRegistrationEndpoint`,`authorizationServerTokenEndpoint`,`authorizationServerUri`,`clientId`,`clientIdIssuedAt`,`clientName`,`clientSecret`,`clientSecretExpiresAt`,`clientUri`,`contacts`,`dataCustodianApplicationStatus`,`dataCustodianBulkRequestURI`,`dataCustodianDefaultBatchResource`,`dataCustodianDefaultSubscriptionResource`,`dataCustodianId`,`dataCustodianResourceEndpoint`,`dataCustodianThirdPartySelectionScreenURI`,`grantTypes`,`logoUri`,`policyUri`,`redirectUri`,`registrationAccessToken`,`registrationClientUri`,`responseTypes`,`softwareId`,`softwareVersion`,`thirdPartyApplicationDescription`,`thirdPartyApplicationName`,`thirdPartyApplicationStatus`,`thirdPartyApplicationType`,`thirdPartyApplicationUse`,`thirdPartyDataCustodianSelectionScreenURI`,`thirdPartyLoginScreenURI`,`thirdPartyNotifyUri`,`thirdPartyPhone`,`thirdPartyScopeSelectionScreenURI`,`thirdPartyUserPortalScreenURI`,`tokenEndpointAuthMethod`,`tosUri`) VALUES (1,'GreenButtonData.org DataCustodian Application','2014-01-02 05:00:00','/espi/1_1/resource/DataCustodian/ApplicationInformation/1','self','/espi/1_1/resource/DataCustodian/ApplicationInformation','up','2014-01-02 05:00:00','AF6E8B03-0299-467E-972A-A883ECDCC575',NULL,NULL,NULL,NULL,'third_party',NULL,NULL,'secret',NULL,NULL,NULL,'','',NULL,NULL,'data_custodian','http://localhost:8080/DataCustodian/espi/1_1/resource',NULL,NULL,NULL,NULL,'http://localhost:8080/ThirdParty/espi/1_1/OAuthCallBack',NULL,NULL,NULL,NULL,NULL,NULL,'Third Party (localhost)',NULL,NULL,NULL,NULL,NULL,'http://localhost:8080/ThirdParty/espi/1_1/Notification',NULL,'http://localhost:8080/ThirdParty/RetailCustomer/ScopeSelection',NULL,NULL,NULL);
2737

2838
/* Add application_information_scopes */
2939
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_15;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
30-
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_16;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
40+
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_15;IntervalDuration=900;BlockDuration=monthly;HistoryLength=13');
3141

3242
USE `thirdparty`;
3343

@@ -57,5 +67,5 @@ INSERT INTO `application_information` (`id`,`description`,`published`,`self_link
5767

5868
/* Add application_information_scopes */
5969
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_15;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
60-
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_16;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
61-
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (2, 'FB=4_5_16;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
70+
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_15;IntervalDuration=900;BlockDuration=monthly;HistoryLength=13');
71+
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (2, 'FB=4_5_12_15_16;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');

etc/prepopulatesql_services_greenbuttondata_org80.sql

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
USE `datacustodian`;
2+
3+
/* Add service kind */
24
INSERT INTO service_categories (kind) VALUES (0);
35
INSERT INTO service_categories (kind) VALUES (1);
46
INSERT INTO service_categories (kind) VALUES (2);
@@ -10,13 +12,7 @@ INSERT INTO service_categories (kind) VALUES (7);
1012
INSERT INTO service_categories (kind) VALUES (8);
1113
INSERT INTO service_categories (kind) VALUES (9);
1214

13-
14-
15-
16-
17-
18-
19-
15+
/* Add retail customers */
2016
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('alan', 'Alan', 'Turing', 'koala', TRUE, 'ROLE_USER');
2117
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('donald', 'Donald', 'Knuth', 'koala', TRUE, 'ROLE_USER');
2218
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('paul', 'Paul', 'Dirac', 'koala', TRUE, 'ROLE_USER');
@@ -36,13 +32,16 @@ INSERT INTO retail_customers (username, first_name, last_name, password, enabled
3632

3733
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('grace', 'Grace', 'Hopper', 'koala', TRUE, 'ROLE_CUSTODIAN');
3834

39-
40-
35+
/* Add application_information */
4136
INSERT INTO application_information (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`,`authorizationServerAuthorizationEndpoint`,`authorizationServerRegistrationEndpoint`,`authorizationServerTokenEndpoint`,`authorizationServerUri`,`clientId`,`clientIdIssuedAt`,`clientName`,`clientSecret`,`clientSecretExpiresAt`,`clientUri`,`contacts`,`dataCustodianApplicationStatus`,`dataCustodianBulkRequestURI`,`dataCustodianDefaultBatchResource`,`dataCustodianDefaultSubscriptionResource`,`dataCustodianId`,`dataCustodianResourceEndpoint`,`dataCustodianThirdPartySelectionScreenURI`,`grantTypes`,`logoUri`,`policyUri`,`redirectUri`,`registrationAccessToken`,`registrationClientUri`,`responseTypes`,`softwareId`,`softwareVersion`,`thirdPartyApplicationDescription`,`thirdPartyApplicationName`,`thirdPartyApplicationStatus`,`thirdPartyApplicationType`,`thirdPartyApplicationUse`,`thirdPartyDataCustodianSelectionScreenURI`,`thirdPartyLoginScreenURI`,`thirdPartyNotifyUri`,`thirdPartyPhone`,`thirdPartyScopeSelectionScreenURI`,`thirdPartyUserPortalScreenURI`,`tokenEndpointAuthMethod`,`tosUri`) VALUES (1,'GreenButtonData.org DataCustodian Application','2014-01-02 05:00:00','/espi/1_1/resource/DataCustodian/ApplicationInformation/1','self','/espi/1_1/resource/DataCustodian/ApplicationInformation','up','2014-01-02 05:00:00','AF6E8B03-0299-467E-972A-A883ECDCC575',NULL,NULL,NULL,NULL,'third_party',NULL,NULL,'secret',NULL,NULL,NULL,'','',NULL,NULL,'data_custodian','https://services.greenbuttondata.org/DataCustodian/espi/1_1/resource',NULL,NULL,NULL,NULL,'https://services.greenbuttondata.org/ThirdParty/espi/1_1/OAuthCallBack',NULL,NULL,NULL,NULL,NULL,NULL,'Third Party (localhost)',NULL,NULL,NULL,NULL,NULL,'https://services.greenbuttondata.org/ThirdParty/espi/1_1/Notification',NULL,'https://services.greenbuttondata.org/ThirdParty/RetailCustomer/ScopeSelection',NULL,NULL,NULL);
37+
38+
/* Add application_information_scopes */
4239
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_15;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
43-
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_16;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
40+
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_15;IntervalDuration=900;BlockDuration=monthly;HistoryLength=13');
4441

4542
USE `thirdparty`;
43+
44+
/* Add service kind */
4645
INSERT INTO service_categories (kind) VALUES (0);
4746
INSERT INTO service_categories (kind) VALUES (1);
4847
INSERT INTO service_categories (kind) VALUES (2);
@@ -54,17 +53,19 @@ INSERT INTO service_categories (kind) VALUES (7);
5453
INSERT INTO service_categories (kind) VALUES (8);
5554
INSERT INTO service_categories (kind) VALUES (9);
5655

56+
/* Add retail customers */
5757
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('alan', 'Alan', 'Turing', 'koala', TRUE, 'ROLE_USER');
5858
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('marissa', 'Marissa', 'Meyer', 'koala', TRUE, 'ROLE_USER');
5959
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('sam', 'Sam', 'White', 'koala', TRUE, 'ROLE_USER');
6060
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('grace', 'Grace', 'Hopper', 'koala', TRUE, 'ROLE_CUSTODIAN');
6161

6262

63-
63+
/* Add application_information */
6464
INSERT INTO `application_information` (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`,`authorizationServerAuthorizationEndpoint`,`authorizationServerRegistrationEndpoint`,`authorizationServerTokenEndpoint`,`authorizationServerUri`,`clientId`,`clientIdIssuedAt`,`clientName`,`clientSecret`,`clientSecretExpiresAt`,`clientUri`,`contacts`,`dataCustodianApplicationStatus`,`dataCustodianBulkRequestURI`,`dataCustodianDefaultBatchResource`,`dataCustodianDefaultSubscriptionResource`,`dataCustodianId`,`dataCustodianResourceEndpoint`,`dataCustodianThirdPartySelectionScreenURI`,`grantTypes`,`logoUri`,`policyUri`,`redirectUri`,`registrationAccessToken`,`registrationClientUri`,`responseTypes`,`softwareId`,`softwareVersion`,`thirdPartyApplicationDescription`,`thirdPartyApplicationName`,`thirdPartyApplicationStatus`,`thirdPartyApplicationType`,`thirdPartyApplicationUse`,`thirdPartyDataCustodianSelectionScreenURI`,`thirdPartyLoginScreenURI`,`thirdPartyNotifyUri`,`thirdPartyPhone`,`thirdPartyScopeSelectionScreenURI`,`thirdPartyUserPortalScreenURI`,`tokenEndpointAuthMethod`,`tosUri`) VALUES (1,'GreenButtonData.org ThirdParty Application','2014-01-02 05:00:00','/espi/1_1/resource/ThirdParty/ApplicationInformation/1','self','/espi/1_1/resource/ThirdParty/ApplicationInformation','up','2014-01-02 05:00:00','B921A307-A7EC-429E-A34D-37B6370FEE0F','https://services.greenbuttondata.org/DataCustodian/oauth/authorize',NULL,'https://services.greenbuttondata.org/DataCustodian/oauth/token',NULL,'third_party',NULL,NULL,'secret',NULL,NULL,NULL,'','',NULL,NULL,'data_custodian','https://services.greenbuttondata.org/DataCustodian/espi/1_1/resource',NULL,NULL,NULL,NULL,'https://services.greenbuttondata.org/ThirdParty/espi/1_1/OAuthCallBack',NULL,NULL,NULL,NULL,NULL,NULL,'Third Party (localhost)',NULL,NULL,NULL,NULL,NULL,'https://services.greenbuttondata.org/ThirdParty/espi/1_1/Notification',NULL,'https://services.greenbuttondata.org/DataCustodian/RetailCustomer/ScopeSelectionList',NULL,NULL,NULL);
65-
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_15;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
66-
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_16;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
67-
6865
INSERT INTO `application_information` (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`,`authorizationServerAuthorizationEndpoint`,`authorizationServerRegistrationEndpoint`,`authorizationServerTokenEndpoint`,`authorizationServerUri`,`clientId`,`clientIdIssuedAt`,`clientName`,`clientSecret`,`clientSecretExpiresAt`,`clientUri`,`contacts`,`dataCustodianApplicationStatus`,`dataCustodianBulkRequestURI`,`dataCustodianDefaultBatchResource`,`dataCustodianDefaultSubscriptionResource`,`dataCustodianId`,`dataCustodianResourceEndpoint`,`dataCustodianThirdPartySelectionScreenURI`,`grantTypes`,`logoUri`,`policyUri`,`redirectUri`,`registrationAccessToken`,`registrationClientUri`,`responseTypes`,`softwareId`,`softwareVersion`,`thirdPartyApplicationDescription`,`thirdPartyApplicationName`,`thirdPartyApplicationStatus`,`thirdPartyApplicationType`,`thirdPartyApplicationUse`,`thirdPartyDataCustodianSelectionScreenURI`,`thirdPartyLoginScreenURI`,`thirdPartyNotifyUri`,`thirdPartyPhone`,`thirdPartyScopeSelectionScreenURI`,`thirdPartyUserPortalScreenURI`,`tokenEndpointAuthMethod`,`tosUri`) VALUES (2,'GreenButtonData.org ThirdParty Application','2014-01-02 05:00:00','/espi/1_1/resource/ThirdParty/ApplicationInformation/2','self','/espi/1_1/resource/ThirdParty/ApplicationInformation','up','2014-01-02 05:00:00','B921A307-A7EC-429E-A34D-37B6370FEE0F','https://services.greenbuttondata.org/DataCustodian/oauth/authorize',NULL,'https://services.greenbuttondata.org/DataCustodian/oauth/token',NULL,'third_party',NULL,NULL,'secret',NULL,NULL,NULL,'','',NULL,NULL,'data_custodian2','https://services.greenbuttondata.org/DataCustodian/espi/1_1/resource',NULL,NULL,NULL,NULL,'https://services.greenbuttondata.org/ThirdParty/espi/1_1/OAuthCallBack',NULL,NULL,NULL,NULL,NULL,NULL,'Third Party (localhost)',NULL,NULL,NULL,NULL,NULL,'https://services.greenbuttondata.org/ThirdParty/espi/1_1/Notification',NULL,'https://services.greenbuttondata.org/DataCustodian/RetailCustomer/ScopeSelectionList',NULL,NULL,NULL);
69-
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (2, 'FB=4_5_16;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
7066

67+
68+
/* Add application_information_scopes */
69+
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_15;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');
70+
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (1, 'FB=4_5_15;IntervalDuration=900;BlockDuration=monthly;HistoryLength=13');
71+
INSERT INTO application_information_scopes (application_information_id, scope) VALUES (2, 'FB=4_5_12_15_16;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13');

0 commit comments

Comments
 (0)