-- *********************************************************************
-- Update Database Script
-- *********************************************************************
-- Change Log: META-INF/jpa-changelog-master.xml
-- Ran at: 2/1/17 7:55 AM
-- Against: DBALLO07@jdbc:oracle:thin:@db-11.rhev-ci-vms.eng.rdu2.redhat.com:1521:orcl
-- Liquibase version: 3.4.1
-- *********************************************************************



-- Changeset META-INF/db2-jpa-changelog-1.0.0.Final.xml::1.0.0.Final::sthorger@redhat.com
INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.0.0.Final', 'sthorger@redhat.com', 'META-INF/db2-jpa-changelog-1.0.0.Final.xml', SYSTIMESTAMP, 20, '7:f061c3934594ee60a9b2343f5100ae4e', 'createTable (x29), addPrimaryKey (x21), addUniqueConstraint (x6), addForeignKeyConstraint (x30)', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/db2-jpa-changelog-1.2.0.Beta1.xml::1.2.0.Beta1::psilva@redhat.com
INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.2.0.Beta1', 'psilva@redhat.com', 'META-INF/db2-jpa-changelog-1.2.0.Beta1.xml', SYSTIMESTAMP, 21, '7:2e01012df20974c1c2a605ef8afe25b7', 'delete (x4), createTable (x8), addColumn (x2), addPrimaryKey (x6), addForeignKeyConstraint (x9), addUniqueConstraint (x2), addColumn, dropForeignKeyConstraint (x2), dropUniqueConstraint, renameColumn (x3), customChange, dropForeignKeyConstraint, d...', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/db2-jpa-changelog-1.2.0.CR1.xml::1.2.0.RC1::bburke@redhat.com
INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.2.0.RC1', 'bburke@redhat.com', 'META-INF/db2-jpa-changelog-1.2.0.CR1.xml', SYSTIMESTAMP, 22, '7:a77ea2ad226b345e7d689d366f185c8c', 'delete (x5), createTable (x3), addColumn, createTable (x4), addPrimaryKey (x7), addForeignKeyConstraint (x6), renameColumn, addUniqueConstraint, addColumn (x2), update, dropColumn, dropForeignKeyConstraint, renameColumn, addForeignKeyConstraint, r...', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/db2-jpa-changelog-1.4.0.xml::1.4.0::bburke@redhat.com
INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.4.0', 'bburke@redhat.com', 'META-INF/db2-jpa-changelog-1.4.0.xml', SYSTIMESTAMP, 23, '7:d909180b2530479a716d3f9c9eaea3d7', 'delete (x7), addColumn (x5), dropColumn, renameTable, dropForeignKeyConstraint, renameTable, addForeignKeyConstraint, update (x10), createTable (x3), customChange, dropPrimaryKey, addPrimaryKey (x4), addForeignKeyConstraint (x2), dropColumn, addCo...', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/db2-jpa-changelog-1.8.0.xml::1.8.0::mposolda@redhat.com
INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.8.0', 'mposolda@redhat.com', 'META-INF/db2-jpa-changelog-1.8.0.xml', SYSTIMESTAMP, 24, '7:f987971fe6b37d963bc95fee2b27f8df', 'addColumn, createTable (x3), dropNotNullConstraint, addColumn (x2), createTable, addPrimaryKey, addUniqueConstraint, addForeignKeyConstraint (x5), addPrimaryKey, addForeignKeyConstraint (x2), addPrimaryKey, addForeignKeyConstraint, update', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/db2-jpa-changelog-1.8.0.xml::1.8.0-2::keycloak
INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.8.0-2', 'keycloak', 'META-INF/db2-jpa-changelog-1.8.0.xml', SYSTIMESTAMP, 25, '7:df8bc21027a4f7cbbb01f6344e89ce07', 'dropDefaultValue, update', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/db2-jpa-changelog-1.9.1.xml::1.9.1::keycloak
INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.9.1', 'keycloak', 'META-INF/db2-jpa-changelog-1.9.1.xml', SYSTIMESTAMP, 26, '7:1437310ed1305a9b93f8848f301726ce', 'modifyDataType (x2)', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-authz-2.0.0.xml::authz-2.0.0::psilva@redhat.com
CREATE TABLE DBALLO07.RESOURCE_SERVER (ID VARCHAR2(36) NOT NULL, CLIENT_ID VARCHAR2(36) NOT NULL, ALLOW_RS_REMOTE_MGMT NUMBER(1) DEFAULT 0 NOT NULL, POLICY_ENFORCE_MODE VARCHAR2(15) NOT NULL);

ALTER TABLE DBALLO07.RESOURCE_SERVER ADD CONSTRAINT CONSTRAINT_FARS PRIMARY KEY (ID);

ALTER TABLE DBALLO07.RESOURCE_SERVER ADD CONSTRAINT UK_AU8TT6T700S9V50BU18WS5HA6 UNIQUE (CLIENT_ID);

CREATE TABLE DBALLO07.RESOURCE_SERVER_RESOURCE (ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255) NOT NULL, URI VARCHAR2(255), TYPE VARCHAR2(255), ICON_URI VARCHAR2(255), OWNER VARCHAR2(36) NOT NULL, RESOURCE_SERVER_ID VARCHAR2(36) NOT NULL);

ALTER TABLE DBALLO07.RESOURCE_SERVER_RESOURCE ADD CONSTRAINT CONSTRAINT_FARSR PRIMARY KEY (ID);

ALTER TABLE DBALLO07.RESOURCE_SERVER_RESOURCE ADD CONSTRAINT FK_FRSRHO213XCX4WNKOG82SSRFY FOREIGN KEY (RESOURCE_SERVER_ID) REFERENCES DBALLO07.RESOURCE_SERVER (ID);

ALTER TABLE DBALLO07.RESOURCE_SERVER_RESOURCE ADD CONSTRAINT UK_FRSR6T700S9V50BU18WS5HA6 UNIQUE (NAME, OWNER, RESOURCE_SERVER_ID);

CREATE TABLE DBALLO07.RESOURCE_SERVER_SCOPE (ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255) NOT NULL, ICON_URI VARCHAR2(255), RESOURCE_SERVER_ID VARCHAR2(36) NOT NULL);

ALTER TABLE DBALLO07.RESOURCE_SERVER_SCOPE ADD CONSTRAINT CONSTRAINT_FARSRS PRIMARY KEY (ID);

ALTER TABLE DBALLO07.RESOURCE_SERVER_SCOPE ADD CONSTRAINT FK_FRSRSO213XCX4WNKOG82SSRFY FOREIGN KEY (RESOURCE_SERVER_ID) REFERENCES DBALLO07.RESOURCE_SERVER (ID);

ALTER TABLE DBALLO07.RESOURCE_SERVER_SCOPE ADD CONSTRAINT UK_FRSRST700S9V50BU18WS5HA6 UNIQUE (NAME, RESOURCE_SERVER_ID);

CREATE TABLE DBALLO07.RESOURCE_SERVER_POLICY (ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255) NOT NULL, DESCRIPTION VARCHAR2(255), TYPE VARCHAR2(255) NOT NULL, DECISION_STRATEGY VARCHAR2(20), LOGIC VARCHAR2(20), RESOURCE_SERVER_ID VARCHAR2(36) NOT NULL);

ALTER TABLE DBALLO07.RESOURCE_SERVER_POLICY ADD CONSTRAINT CONSTRAINT_FARSRP PRIMARY KEY (ID);

ALTER TABLE DBALLO07.RESOURCE_SERVER_POLICY ADD CONSTRAINT FK_FRSRPO213XCX4WNKOG82SSRFY FOREIGN KEY (RESOURCE_SERVER_ID) REFERENCES DBALLO07.RESOURCE_SERVER (ID);

ALTER TABLE DBALLO07.RESOURCE_SERVER_POLICY ADD CONSTRAINT UK_FRSRPT700S9V50BU18WS5HA6 UNIQUE (NAME, RESOURCE_SERVER_ID);

CREATE TABLE DBALLO07.POLICY_CONFIG (POLICY_ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255) NOT NULL, VALUE CLOB);

ALTER TABLE DBALLO07.POLICY_CONFIG ADD CONSTRAINT CONSTRAINT_DPC PRIMARY KEY (POLICY_ID, NAME);

ALTER TABLE DBALLO07.POLICY_CONFIG ADD CONSTRAINT FKDC34197CF864C4E43 FOREIGN KEY (POLICY_ID) REFERENCES DBALLO07.RESOURCE_SERVER_POLICY (ID);

CREATE TABLE DBALLO07.RESOURCE_SCOPE (RESOURCE_ID VARCHAR2(36) NOT NULL, SCOPE_ID VARCHAR2(36) NOT NULL);

ALTER TABLE DBALLO07.RESOURCE_SCOPE ADD CONSTRAINT CONSTRAINT_FARSRSP PRIMARY KEY (RESOURCE_ID, SCOPE_ID);

ALTER TABLE DBALLO07.RESOURCE_SCOPE ADD CONSTRAINT FK_FRSRPOS13XCX4WNKOG82SSRFY FOREIGN KEY (RESOURCE_ID) REFERENCES DBALLO07.RESOURCE_SERVER_RESOURCE (ID);

ALTER TABLE DBALLO07.RESOURCE_SCOPE ADD CONSTRAINT FK_FRSRPS213XCX4WNKOG82SSRFY FOREIGN KEY (SCOPE_ID) REFERENCES DBALLO07.RESOURCE_SERVER_SCOPE (ID);

CREATE TABLE DBALLO07.RESOURCE_POLICY (RESOURCE_ID VARCHAR2(36) NOT NULL, POLICY_ID VARCHAR2(36) NOT NULL);

ALTER TABLE DBALLO07.RESOURCE_POLICY ADD CONSTRAINT CONSTRAINT_FARSRPP PRIMARY KEY (RESOURCE_ID, POLICY_ID);

ALTER TABLE DBALLO07.RESOURCE_POLICY ADD CONSTRAINT FK_FRSRPOS53XCX4WNKOG82SSRFY FOREIGN KEY (RESOURCE_ID) REFERENCES DBALLO07.RESOURCE_SERVER_RESOURCE (ID);

ALTER TABLE DBALLO07.RESOURCE_POLICY ADD CONSTRAINT FK_FRSRPP213XCX4WNKOG82SSRFY FOREIGN KEY (POLICY_ID) REFERENCES DBALLO07.RESOURCE_SERVER_POLICY (ID);

CREATE TABLE DBALLO07.SCOPE_POLICY (SCOPE_ID VARCHAR2(36) NOT NULL, POLICY_ID VARCHAR2(36) NOT NULL);

ALTER TABLE DBALLO07.SCOPE_POLICY ADD CONSTRAINT CONSTRAINT_FARSRSPS PRIMARY KEY (SCOPE_ID, POLICY_ID);

ALTER TABLE DBALLO07.SCOPE_POLICY ADD CONSTRAINT FK_FRSRPASS3XCX4WNKOG82SSRFY FOREIGN KEY (SCOPE_ID) REFERENCES DBALLO07.RESOURCE_SERVER_SCOPE (ID);

ALTER TABLE DBALLO07.SCOPE_POLICY ADD CONSTRAINT FK_FRSRASP13XCX4WNKOG82SSRFY FOREIGN KEY (POLICY_ID) REFERENCES DBALLO07.RESOURCE_SERVER_POLICY (ID);

CREATE TABLE DBALLO07.ASSOCIATED_POLICY (POLICY_ID VARCHAR2(36) NOT NULL, ASSOCIATED_POLICY_ID VARCHAR2(36) NOT NULL);

ALTER TABLE DBALLO07.ASSOCIATED_POLICY ADD CONSTRAINT CONSTRAINT_FARSRPAP PRIMARY KEY (POLICY_ID, ASSOCIATED_POLICY_ID);

ALTER TABLE DBALLO07.ASSOCIATED_POLICY ADD CONSTRAINT FK_FRSRPAS14XCX4WNKOG82SSRFY FOREIGN KEY (POLICY_ID) REFERENCES DBALLO07.RESOURCE_SERVER_POLICY (ID);

ALTER TABLE DBALLO07.ASSOCIATED_POLICY ADD CONSTRAINT FK_FRSR5S213XCX4WNKOG82SSRFY FOREIGN KEY (ASSOCIATED_POLICY_ID) REFERENCES DBALLO07.RESOURCE_SERVER_POLICY (ID);

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('authz-2.0.0', 'psilva@redhat.com', 'META-INF/jpa-changelog-authz-2.0.0.xml', SYSTIMESTAMP, 27, '7:9cc98082921330d8d9266decdd4bd658', 'createTable, addPrimaryKey, addUniqueConstraint, createTable, addPrimaryKey, addForeignKeyConstraint, addUniqueConstraint, createTable, addPrimaryKey, addForeignKeyConstraint, addUniqueConstraint, createTable, addPrimaryKey, addForeignKeyConstrain...', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-authz-2.5.1.xml::authz-2.5.1::psilva@redhat.com
UPDATE DBALLO07.RESOURCE_SERVER_POLICY SET TYPE = 'rules' WHERE TYPE = 'drools';

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('authz-2.5.1', 'psilva@redhat.com', 'META-INF/jpa-changelog-authz-2.5.1.xml', SYSTIMESTAMP, 28, '7:03d64aeed9cb52b969bd30a7ac0db57e', 'update', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.1.0.xml::2.1.0::bburke@redhat.com
CREATE TABLE DBALLO07.BROKER_LINK (IDENTITY_PROVIDER VARCHAR2(255) NOT NULL, STORAGE_PROVIDER_ID VARCHAR2(255), REALM_ID VARCHAR2(36) NOT NULL, BROKER_USER_ID VARCHAR2(255), BROKER_USERNAME VARCHAR2(255), TOKEN CLOB, USER_ID VARCHAR2(255) NOT NULL);

CREATE TABLE DBALLO07.FED_USER_ATTRIBUTE (ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255) NOT NULL, USER_ID VARCHAR2(255) NOT NULL, REALM_ID VARCHAR2(36) NOT NULL, STORAGE_PROVIDER_ID VARCHAR2(36), VALUE VARCHAR2(2024));

CREATE TABLE DBALLO07.FED_USER_CONSENT (ID VARCHAR2(36) NOT NULL, CLIENT_ID VARCHAR2(36) NOT NULL, USER_ID VARCHAR2(255) NOT NULL, REALM_ID VARCHAR2(36) NOT NULL, STORAGE_PROVIDER_ID VARCHAR2(36));

CREATE TABLE DBALLO07.FED_USER_CONSENT_ROLE (USER_CONSENT_ID VARCHAR2(36) NOT NULL, ROLE_ID VARCHAR2(36) NOT NULL);

CREATE TABLE DBALLO07.FED_USER_CONSENT_PROT_MAPPER (USER_CONSENT_ID VARCHAR2(36) NOT NULL, PROTOCOL_MAPPER_ID VARCHAR2(36) NOT NULL);

CREATE TABLE DBALLO07.FED_USER_CREDENTIAL (ID VARCHAR2(36) NOT NULL, DEVICE VARCHAR2(255), HASH_ITERATIONS NUMBER(10), SALT BLOB, TYPE VARCHAR2(255), VALUE VARCHAR2(255), CREATED_DATE NUMBER(38, 0), COUNTER NUMBER(10) DEFAULT 0, DIGITS NUMBER(10) DEFAULT 6, PERIOD NUMBER(10) DEFAULT 30, ALGORITHM VARCHAR2(36) DEFAULT 'HmacSHA1', USER_ID VARCHAR2(255) NOT NULL, REALM_ID VARCHAR2(36) NOT NULL, STORAGE_PROVIDER_ID VARCHAR2(36));

CREATE TABLE DBALLO07.FED_USER_GROUP_MEMBERSHIP (GROUP_ID VARCHAR2(36) NOT NULL, USER_ID VARCHAR2(255) NOT NULL, REALM_ID VARCHAR2(36) NOT NULL, STORAGE_PROVIDER_ID VARCHAR2(36));

CREATE TABLE DBALLO07.FED_USER_REQUIRED_ACTION (REQUIRED_ACTION VARCHAR2(255) DEFAULT ' ' NOT NULL, USER_ID VARCHAR2(255) NOT NULL, REALM_ID VARCHAR2(36) NOT NULL, STORAGE_PROVIDER_ID VARCHAR2(36));

CREATE TABLE DBALLO07.FED_USER_ROLE_MAPPING (ROLE_ID VARCHAR2(36) NOT NULL, USER_ID VARCHAR2(255) NOT NULL, REALM_ID VARCHAR2(36) NOT NULL, STORAGE_PROVIDER_ID VARCHAR2(36));

CREATE TABLE DBALLO07.COMPONENT_CONFIG (ID VARCHAR2(36) NOT NULL, COMPONENT_ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255) NOT NULL, VALUE VARCHAR2(4000));

CREATE TABLE DBALLO07.COMPONENT (ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255), PARENT_ID VARCHAR2(36), PROVIDER_ID VARCHAR2(36), PROVIDER_TYPE VARCHAR2(255), REALM_ID VARCHAR2(36));

ALTER TABLE DBALLO07.BROKER_LINK ADD CONSTRAINT CONSTR_BROKER_LINK_PK PRIMARY KEY (IDENTITY_PROVIDER, USER_ID);

ALTER TABLE DBALLO07.FED_USER_ATTRIBUTE ADD CONSTRAINT CONSTR_FED_USER_ATTR_PK PRIMARY KEY (ID);

ALTER TABLE DBALLO07.FED_USER_CONSENT ADD CONSTRAINT CONSTR_FED_USER_CONSENT_PK PRIMARY KEY (ID);

ALTER TABLE DBALLO07.FED_USER_CONSENT_ROLE ADD CONSTRAINT CONSTR_USER_CONSENT_ROLE_PK PRIMARY KEY (USER_CONSENT_ID, ROLE_ID);

ALTER TABLE DBALLO07.FED_USER_CONSENT_PROT_MAPPER ADD CONSTRAINT CONSTR_USER_CONSENT_PROTM_PK PRIMARY KEY (USER_CONSENT_ID, PROTOCOL_MAPPER_ID);

ALTER TABLE DBALLO07.FED_USER_CREDENTIAL ADD CONSTRAINT CONSTR_FED_USER_CRED_PK PRIMARY KEY (ID);

ALTER TABLE DBALLO07.FED_USER_GROUP_MEMBERSHIP ADD CONSTRAINT CONSTR_FED_USER_GROUP PRIMARY KEY (GROUP_ID, USER_ID);

ALTER TABLE DBALLO07.FED_USER_ROLE_MAPPING ADD CONSTRAINT CONSTR_FED_USER_ROLE PRIMARY KEY (ROLE_ID, USER_ID);

ALTER TABLE DBALLO07.FED_USER_REQUIRED_ACTION ADD CONSTRAINT CONSTR_FED_REQUIRED_ACTION PRIMARY KEY (REQUIRED_ACTION, USER_ID);

ALTER TABLE DBALLO07.COMPONENT ADD CONSTRAINT CONSTR_COMPONENT_PK PRIMARY KEY (ID);

ALTER TABLE DBALLO07.COMPONENT_CONFIG ADD CONSTRAINT CONSTR_COMPONENT_CONFIG_PK PRIMARY KEY (ID);

ALTER TABLE DBALLO07.COMPONENT ADD CONSTRAINT FK_COMPONENT_REALM FOREIGN KEY (REALM_ID) REFERENCES DBALLO07.REALM (ID);

ALTER TABLE DBALLO07.COMPONENT_CONFIG ADD CONSTRAINT FK_COMPONENT_CONFIG FOREIGN KEY (COMPONENT_ID) REFERENCES DBALLO07.COMPONENT (ID);

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.1.0', 'bburke@redhat.com', 'META-INF/jpa-changelog-2.1.0.xml', SYSTIMESTAMP, 29, '7:e01599a82bf8d6dc22a9da506e22e868', 'createTable (x11), addPrimaryKey (x11), addForeignKeyConstraint (x2)', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.2.0.xml::2.2.0::bburke@redhat.com
ALTER TABLE DBALLO07.ADMIN_EVENT_ENTITY ADD RESOURCE_TYPE VARCHAR2(64);

CREATE TABLE DBALLO07.CREDENTIAL_ATTRIBUTE (ID VARCHAR2(36) NOT NULL, CREDENTIAL_ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255) NOT NULL, VALUE VARCHAR2(4000));

CREATE TABLE DBALLO07.FED_CREDENTIAL_ATTRIBUTE (ID VARCHAR2(36) NOT NULL, CREDENTIAL_ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255) NOT NULL, VALUE VARCHAR2(4000));

ALTER TABLE DBALLO07.CREDENTIAL MODIFY VALUE VARCHAR2(4000);

ALTER TABLE DBALLO07.FED_CREDENTIAL_ATTRIBUTE ADD CONSTRAINT FK_FED_CRED_ATTR FOREIGN KEY (CREDENTIAL_ID) REFERENCES DBALLO07.FED_USER_CREDENTIAL (ID);

ALTER TABLE DBALLO07.CREDENTIAL_ATTRIBUTE ADD CONSTRAINT FK_CRED_ATTR FOREIGN KEY (CREDENTIAL_ID) REFERENCES DBALLO07.CREDENTIAL (ID);

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.2.0', 'bburke@redhat.com', 'META-INF/jpa-changelog-2.2.0.xml', SYSTIMESTAMP, 30, '7:53188c3eb1107546e6f765835705b6c1', 'addColumn, createTable (x2), modifyDataType, addForeignKeyConstraint (x2)', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.3.0.xml::2.3.0::bburke@redhat.com
CREATE TABLE DBALLO07.FEDERATED_USER (ID VARCHAR2(255) NOT NULL, STORAGE_PROVIDER_ID VARCHAR2(255), REALM_ID VARCHAR2(36) NOT NULL);

ALTER TABLE DBALLO07.FEDERATED_USER ADD CONSTRAINT CONSTR_FEDERATED_USER PRIMARY KEY (ID);

ALTER TABLE DBALLO07.USER_ENTITY MODIFY TOTP DEFAULT NULL;

ALTER TABLE DBALLO07.USER_ENTITY DROP COLUMN TOTP;

ALTER TABLE DBALLO07.IDENTITY_PROVIDER ADD PROVIDER_DISPLAY_NAME VARCHAR2(255);

ALTER TABLE DBALLO07.COMPONENT ADD SUB_TYPE VARCHAR2(255);

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('19796509-2341-4223-b171-03b2df95af3e', 'master', 'master', 'rsa', 'rsa', 'org.keycloak.keys.KeyProvider');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ea5abb3c-00c9-4fc4-bd18-d8c3d4daa778', '19796509-2341-4223-b171-03b2df95af3e', 'priority', '100');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('54e28b9c-7ccb-46d0-96c0-73251140c9f5', '19796509-2341-4223-b171-03b2df95af3e', 'privateKey', 'MIIEowIBAAKCAQEAiU54OXoCbHy0L0gHn1yasctcnKHRU1pHFIJnWvaI7rClJydet9dDJaiYXOxMKseiBm3eYznfN3cPyU8udYmRnMuKjiocZ77LT2IEttAjXb6Ggazx7loriFHRy0IOJeX4KxXhAPWmxqa3mkFNfLBEvFqVaBgUDHQ60cmnPvNSHYudBTW9K80s8nvmP2pso7HTwWJ1+Xatj1Ey/gTmB3CXlyqBegGWC9TeuErEYpYhdh+11TVWasgMBZyUCtL3NRPaBuhaPg1LpW8lWGk05nS+YM6dvTk3Mppv+z2RygEpxyO09oT3b4G+Zfwit1STqn0AvDTGzINdoKcNtFScV0j8TwIDAQABAoIBAHcbPKsPLZ8SJfOF1iblW8OzFulAbaaSf2pJHIMJrQrw7LKkMkPjVXoLX+/rgr7xYZmWIP2OLBWfEHCeYTzQUyHiZpSf7vgHx7Fa45/5uVQOe/ttHIiYa37bCtP4vvEdJkOpvP7qGPvljwsebqsk9Ns28LfVez66bHOjK5Mt2yOIulbTeEs7ch//h39YwKJv96vc+CHbV2O6qoOxZessO6y+287cOBvbFXmS2GaGle5Nx/EwncBNS4b7czoetmm70+9ht3yX+kxaP311YUT31KQjuaJt275kOiKsrXr27PvgO++bsIyGuSzqyS7G7fmxF2zUyphEqEpalyDGMKMnrAECgYEA1fCgFox03rPDjm0MhW/ThoS2Ld27sbWQ6reS+PBMdUTJZVZIU1D2//h6VXDnlddhk6avKjA4smdy1aDKzmjz3pt9AKn+kgkXqtTC2fD3wp+fC9hND0z+rQPGe/Gk7ZUnTdsqnfyowxr+woIgzdnRukOUrG+xQiP3RUUT7tt6NQECgYEApEz2xvgqMm+9/f/YxjLdsFUfLqc4WlafB863stYEVqlCYy5ujyo0VQ0ahKSKJkLDnf52+aMUqPOpwaGePpu3O6VkvpcKfPY2MUlZW7/6Sa9et9hxNkdTS7Gui2d1ELpaCBe1Bc62sk8EA01iHXE1PpvyUqDWrhNh+NrDICA9oU8CgYBgGDYACtTP11TmW2r9YK5VRLUDww30k4ZlN1GnyV++aMhBYVEZQ0u+y+A/EnijIFwu0vbo70H4OGknNZMCxbeMbLDoJHM5KyZbUDe5ZvgSjloFGwH59m6KTiDQOUkIgi9mVCQ/VGaFRFHcElEjxUvj60kTbxPijn8ZuR5r8l9hAQKBgQCQ9jL5pHWeoIayN20smi6M6N2lTPbkhe60dcgQatHTIG2pkosLl8IqlHAkPgSB84AiwyR351JQKwRJCm7TcJI/dxMnMZ6YWKfB3qSP1hdfsfJRJQ/mQxIUBAYrizF3e+P5peka4aLCOgMhYsJBlePThMZN7wja99EGPwXQL4IQ8wKBgB8Nis1lQK6Z30GCp9u4dYleGfEP71Lwqvk/eJb89/uz0fjF9CTpJMULFc+nA5u4yHP3LFnRg3zCU6aEwfwUyk4GH9lWGV/qIAisQtgrCEraVe4qxz0DVE59C7qjO26IhU2U66TEzPAqvQ3zqey+woDn/cz/JMWK1vpcSk+TKn3K');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('1cab8235-fd4a-401a-8cd3-82cf1f278065', '19796509-2341-4223-b171-03b2df95af3e', 'certificate', 'MIICmzCCAYMCBgFXt/Tg9TANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0ZXIwHhcNMTYxMDEyMDgxMjQxWhcNMjYxMDEyMDgxNDIxWjARMQ8wDQYDVQQDDAZtYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCJTng5egJsfLQvSAefXJqxy1ycodFTWkcUgmda9ojusKUnJ16310MlqJhc7Ewqx6IGbd5jOd83dw/JTy51iZGcy4qOKhxnvstPYgS20CNdvoaBrPHuWiuIUdHLQg4l5fgrFeEA9abGpreaQU18sES8WpVoGBQMdDrRyac+81Idi50FNb0rzSzye+Y/amyjsdPBYnX5dq2PUTL+BOYHcJeXKoF6AZYL1N64SsRiliF2H7XVNVZqyAwFnJQK0vc1E9oG6Fo+DUulbyVYaTTmdL5gzp29OTcymm/7PZHKASnHI7T2hPdvgb5l/CK3VJOqfQC8NMbMg12gpw20VJxXSPxPAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAC54wFHL8tmrksq4OzatzNUM+R+3Hu/VXX3T44dwg0EvXzGW45sME+gKCuleU1PabIrr6oFm0bBMTdxgE2hbLWpYbU3OcsjArpCeCsOlxrAkqhVQN161J+tp77JkDMgArFdwe3wh5bhvLaOZSt6Fsq+oo16CXG1obe1feyaK3+sU3YuDUIHE01UYtvwtfDsYBC+VDyTdNDbB15WcdRoGljJY/JiT0JHdmAfq8qdGDuxGocIV0lSB8bO5JwF/WCmKqMrnh5j1NfGcE1g26Hbz2RmDs17X0K10Okzs/qz1YZqDjPVYiU//VFQQro71/D35dPOJv8mQMjhjNaXScL44h7w=');

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('221fec04-7cad-4694-a48c-7e3f42dcee44', 'Migration', 'Migration', 'rsa', 'rsa', 'org.keycloak.keys.KeyProvider');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('6328d669-59fb-4de5-9d9e-cf16135dda15', '221fec04-7cad-4694-a48c-7e3f42dcee44', 'priority', '100');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e866a5e2-8dee-4836-96f5-806464397f2f', '221fec04-7cad-4694-a48c-7e3f42dcee44', 'privateKey', 'MIIEpAIBAAKCAQEApt6gCllWkVTZ7fy/oRIx6Bxjt9x3eKKyKGFXvN4iaafrNqpYU9lcqPngWJ9DyXGqUf8RpjPaQWiLWLxjw3xGBqLk2E1/Frb9e/dy8rj//fHGq6bujN1iguzyFwxPGT5Asd7jflRI3qU04M8JE52PArqPhGL2Fn+FiSK5SWRIGm+hVL7Ck/E/tVxM25sFG1/UTQqvrROm4q76TmP8FsyZaTLVf7cCwW2QPIX0N5HTVb3QbBb5KIsk4kKmk/g7uUxS9r42tu533LISzRr5CTyWZAL2XFRuF2RrKdE8gwqkEubw6sDmB2mE0EoPdY1DUhBQgVP/5rwJrCtTsUBR2xdEYQIDAQABAoIBAFbbsNBSOlZBpYJUOmcb8nBQPrOYhXN8tGGCccn0klMOvcdhmcJjdPDbyCQ5Gm7DxJUTwNsTSHsdcNMKlJ9Pk5+msJnKlOl87KrXXbTsCQvlCrWUmb0nCzz9GvJWTOHl3oT3cND0DE4gDksqWR4luCgCdevCGzgQvrBoK6wBD+r578uEW3iw10hnJ0+wnGiw8IvPzE1a9xbY4HD8/QrYdaLxuLb/aC1PDuzrz0cOjnvPkrws5JrbUSnbFygJiOv1z4l2Q00uGIxlHtXdwQBnTZZjVi4vOec2BYSHffgwDYEZIglw1mnrV7y0N1nnPbtJK/cegIkXoBQHXm8Q99TrWMUCgYEA9au86qcwrXZZg5H4BpR5cpy0MSkcKDbA1aRL1cAyTCqJxsczlAtLhFADF+NhnlXj4y7gwDEYWrz064nF73I+ZGicvCiyOy+tCTugTyTGS+XR948ElDMS6PCUUXsotS3dKa0b3c9wd2mxeddTjq/ArfgEVZJ6fE1KtjLt9dtfA+8CgYEAreK3JsvjR5b/Xct28TghYUU7Qnasombb/shqqy8FOMjYUr5OUm/OjNIgoCqhOlE8oQDJ4dOZofNSa7tL+oM8Gmbal+E3fRzxnx/9/EC4QV6sVaPLTIyk7EPfKTcZuzH7+BNZtAziTxJw9d6YJQRbkpg92EZIEoR8iDj2Xs5xrK8CgYEAwMVWwwYX8zT3vn7ukTM2LRH7bsvkVUXJgJqgCwT6Mrv6SmkK9vL5+cPS+Y6pjdW1sRGauBSOGL1Grf/4ug/6F03jFt4UJM8fRyxreU7Q7sNSQ6AMpsGA6BnHODycz7ZCYa59PErG5FyiL4of/cm5Nolz1TXQOPNpWZiTEqVlZC8CgYA4YPbjVF4nuxSnU64H/hwMjsbtAM9uhI016cN0J3W4+J3zDhMU9X1x+Tts0wWdg/N1fGz4lIQOl3cUyRCUc/KL2OdtMS+tmDHbVyMho9ZaE5kq10W2Vy+uDz+O/HeSU12QDK4cC8Vgv+jyPy7zaZtLR6NduUPrBRvfiyCOkr8WrwKBgQCY0h4RCdNFhr0KKLLmJipAtV8wBCGcg1jY1KoWKQswbcykfBKwHbF6EooVqkRW0ITjWB7ZZCf8TnSUxe0NXCUAkVBrhzS4DScgtoSZYOOUaSHgOxpfwgnQ3oYotKi98Yg3IsaLs1j4RuPG5Sp1z6o+ELP1uvr8azyn9YlLa+523Q==');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f01097ac-eedd-48fd-a325-e61db384f5e1', '221fec04-7cad-4694-a48c-7e3f42dcee44', 'certificate', 'MIICoTCCAYkCBgFXt/t9TjANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAlNaWdyYXRpb24wHhcNMTYxMDEyMDgxOTU0WhcNMjYxMDEyMDgyMTM0WjAUMRIwEAYDVQQDDAlNaWdyYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCm3qAKWVaRVNnt/L+hEjHoHGO33Hd4orIoYVe83iJpp+s2qlhT2Vyo+eBYn0PJcapR/xGmM9pBaItYvGPDfEYGouTYTX8Wtv1793LyuP/98carpu6M3WKC7PIXDE8ZPkCx3uN+VEjepTTgzwkTnY8Cuo+EYvYWf4WJIrlJZEgab6FUvsKT8T+1XEzbmwUbX9RNCq+tE6birvpOY/wWzJlpMtV/twLBbZA8hfQ3kdNVvdBsFvkoiyTiQqaT+Du5TFL2vja27nfcshLNGvkJPJZkAvZcVG4XZGsp0TyDCqQS5vDqwOYHaYTQSg91jUNSEFCBU//mvAmsK1OxQFHbF0RhAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFtPdVUB65dAP6v2wu8idPkkqRaP5gmcOuOt2+8/slx7RvO/FFwzFvAqroqmpaKJ53daewZwIG4Wzu4lziqYnD3F3YoqxqUY8ID58SLm9a6XF6aYka7TxXJnZgmy7v1ZWcbbTinvUC7S1m23imT7779cWj5NkkXSM/R+RWB8ZAQCpy9pg7iElAMTlqAp31pCntNG3l1O13A6t5eN3Af474T0FjVaXIEG/PLcRmF/5kTwmkYy5Av1v2vmyLBYXKNUrWwjeTGEEX0+j9AkcF79D1GpdKZpvuC0wxOrOgHLiR9DpGucMJajx+RA8zbAAj5C1A5JfkKBZPh2jMQ06c2eAAM=');

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('658a05a5-ebc4-45bb-a24b-0e74fc291ec9', 'Migration2', 'Migration2', 'rsa', 'rsa', 'org.keycloak.keys.KeyProvider');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b22662af-774f-4e55-b2ad-112e46d09319', '658a05a5-ebc4-45bb-a24b-0e74fc291ec9', 'priority', '100');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('98c338f3-3807-4425-a376-004b2b566146', '658a05a5-ebc4-45bb-a24b-0e74fc291ec9', 'privateKey', 'MIIEowIBAAKCAQEAgzWQuDVTEV0It1322wbNGKc9SSxG9rayxRPbG7YSj4cMP6BO4eblRoUw5ebKCng+OD5FhVIlBnkzoGOCnL/VXaQnEQbqlNwO/N5Ca6/4Mc/MedX8LamlYbo+varVQAJQTZSMp9+NeQZZbSQ3L9EYhsCUdPANwVqYn/CM37FpNZDYfBDxEtaxwP6suuVfUJcupx+YayUbIQ2ZP/FgTE1b/3C3J7nCAhDYlJTag84FOkVhPL2xI9T2XozyHVVwSsPTQDPK+HrTTnE9UqBsglz3ASXElixSs1WKef3iTFiU77p8pjTcxfm3xaE9eLD3tK805KQForBZ7pYSbgp8bY9F7wIDAQABAoIBACH3jf2CIH0QPp9pvew5uIK3WNBGnCBmb6VBXKmx2uA5L9yQ3ZrxsU0uUdhShN9s/X6F8G1xNJCWc90Dpd56cvwI8OwhhD0BMwgXac6DAZezmdW4pc4UavH/yxpCzW4Cq1NKL5eN8gvwrtnoVDkWwmiwFj6nnof9siFFntKSFRB+isvzj+X4wDb0Qc39eeyRdcXGxEwfgVDWIDKCdvW942aEl23WL8LBVshRj/PFu9m7htaoLMk3r27yaFZmzPWbAG/gojCA9EhndpmPrUteReboYcDWc6l3zgdGqxHVyR+JHWdeRMnsdouPoa+2C6nY4THzgkp+NEOsuxc8msTssWECgYEA7cl/SZJrCXIA2Q58mRis5W3F9ZsVx1O+yHpqrXX6a6+MPZ/ERTGY8zU8QINCPmJOGt5APeq9eZNtpaDrGb3KD8Y341LKjkF8uVMg8HJUttHrRZtHm0M+8a7Yf8oIynOkCUaUvnxEerpNPF3TKySfCer1vd9z+GUE3KTj12gAAscCgYEAjUJNJwp5oIbvNZEzFsNJV3MK1xFOxR1/zxoqXKVNVqtz4aOEaqnDd/t7XM+pkW/FSp8V+mZC1+vl4X4mBlTYWxuSMLifglJWlDflgOfPvQNYbDDg94mBleFQ/J7Y4ArEBTdu7QEcaPPwAXocusoeEG+yQpon+CCfkDMUkWIIe5kCgYEAuJT2euzuq7lUUSm+rLUL2VjaFypYwI8QhN0KHDZ9usPdkCSKHdA/U2OartV1QanbyV2G7sleZZZ8wdplRWkfBhmvXoXw+HZ7U/zkj+GgQv42rKS59BtCLCe2pZP2OPmFdzHT2v3pxn8B339Roabe0bsTIV3ozwPTv1c8CgUQJRcCgYBflOJRrXPZHBSWYXZ5S5C/3HcUSYDMPgayYxkQ8UUghQj3P8akydQaxo6VoWoyn7eWo4iikzldkyBMcShXlmeDVmeYEgTUkNRGnH/ttm1Jjw7wvi4rMN7/RKOhG/bRulci1Hx5YAwSNCVNSoxQE9097+ZlzJuI+MIfN4EOUpA82QKBgBdxizw7x2v4g8s2maBcuA1YhncIgPQFnAWHzI7kn5dNHImHRlcM56mEW82u3kZJDVmxM6eNwbI9L+tqPcWwPmI3/NJB970kmVSGWIE7B2AfINkCyAe2fGZaUUxbmNi/01BPIUdRHHxYQsKEdSozi5bET0lLmVnOSBU3qPq9yJZx');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('34de09ac-336d-47c0-a27d-827983db2312', '658a05a5-ebc4-45bb-a24b-0e74fc291ec9', 'certificate', 'MIICozCCAYsCBgFZkvmqVDANBgkqhkiG9w0BAQsFADAVMRMwEQYDVQQDDApNaWdyYXRpb24yMB4XDTE3MDExMjEzNTczMloXDTI3MDExMjEzNTkxMlowFTETMBEGA1UEAwwKTWlncmF0aW9uMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIM1kLg1UxFdCLdd9tsGzRinPUksRva2ssUT2xu2Eo+HDD+gTuHm5UaFMOXmygp4Pjg+RYVSJQZ5M6Bjgpy/1V2kJxEG6pTcDvzeQmuv+DHPzHnV/C2ppWG6Pr2q1UACUE2UjKffjXkGWW0kNy/RGIbAlHTwDcFamJ/wjN+xaTWQ2HwQ8RLWscD+rLrlX1CXLqcfmGslGyENmT/xYExNW/9wtye5wgIQ2JSU2oPOBTpFYTy9sSPU9l6M8h1VcErD00Azyvh6005xPVKgbIJc9wElxJYsUrNVinn94kxYlO+6fKY03MX5t8WhPXiw97SvNOSkBaKwWe6WEm4KfG2PRe8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAQh8J7vFKuj3GN8LBM1FkQopMJZBCc07ZtgWGMx2qEiQKaIgevUdwDm6hjbij06b4oZHWxtC6A8CnVD6R2Uf8+gk0j26xnOJkMNWGw0jpYpKIIpdGHT/lcvnS8ao/c+DZr8CNXZNWeVaDdOv/IDi8+B9n9qwgsGQDHCZ5VT20yBPaJTNUyqVefAtL680yIGz46bI+U7Iipz+1FlFjvDwjSKhOhLPtpD5SP5/AVDbYtD/UPh0yLHSva+/XanGQjhveKVdApoViDgVcdAlj3WO1+L4hVPHfasVLDlhSuDLaFTrPH6Yepv5CxvMpdPOJjAJI4EqMWWxslAjFEV78ya7gKw==');

ALTER TABLE DBALLO07.REALM DROP COLUMN CODE_SECRET;

ALTER TABLE DBALLO07.REALM DROP COLUMN PRIVATE_KEY;

ALTER TABLE DBALLO07.REALM DROP COLUMN PUBLIC_KEY;

ALTER TABLE DBALLO07.REALM DROP COLUMN CERTIFICATE;

ALTER TABLE DBALLO07.USER_CONSENT ADD CREATED_DATE NUMBER(38, 0);

ALTER TABLE DBALLO07.USER_CONSENT ADD LAST_UPDATED_DATE NUMBER(38, 0);

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.3.0', 'bburke@redhat.com', 'META-INF/jpa-changelog-2.3.0.xml', SYSTIMESTAMP, 31, '7:d6e6f3bc57a0c5586737d1351725d4d4', 'createTable, addPrimaryKey, dropDefaultValue, dropColumn, addColumn (x2), customChange, dropColumn (x4), addColumn', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.4.0.xml::2.4.0::bburke@redhat.com
INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'Migration2', 'Migration2', 'ldap-provider', 'ldap', 'org.keycloak.storage.UserStorageProvider');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('7e9b00d1-836b-44e8-b256-83e993f8d70c', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'priority', '2');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f3a19dd6-90f5-4a98-9c02-b074e3b6a83a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'fullSyncPeriod', '-1');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('7b86f892-94a6-4d2f-af36-cfd04b9484a6', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'changedSyncPeriod', '-1');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('6edfd6fd-1e67-4d2f-92bd-7666f12cd54b', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'lastSync', '0');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('324b008d-b019-4336-a01d-4cebe1018f1f', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'allowKerberosAuthentication', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ea6ef43d-28a3-4425-b68d-8e5467f481ff', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'authType', 'none');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('2f510b67-7ffc-4fdd-b046-4a9f3460da9d', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'batchSizeForSync', '1001');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('76d30799-8bce-41f3-ac53-1972add2bd28', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionPooling', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('db15ade6-ea5a-481a-86e9-323a5097c684', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionUrl', 'http://localhost');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('644418fa-ef60-4dd3-9b01-d53bb3c0f44a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'debug', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('39ee252f-04d5-475f-a00a-aad1952f4687', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'editMode', 'READ_ONLY');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ae80319d-5bc6-4b8a-8b05-5280f1bb4db9', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'kerberosRealm', 'realm');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('244277a0-23b4-405c-8b99-62f8315a9850', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'keyTab', 'keytab');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a658d132-e1f0-4dc9-b50f-3dfa123f2503', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'pagination', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('61d231ac-a95a-4628-8fae-53fe20d4e9aa', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'rdnLDAPAttribute', 'uid');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('94c5945f-e7f2-42e1-8419-61a8dab8d947', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'searchScope', '1');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('45302e4d-dd93-4633-99de-f699add354c0', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'serverPrincipal', 'principal');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('34aa6715-f8d5-45e4-9f1c-0f2e8c9057ad', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'syncRegistrations', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3372e57b-f0e3-462e-9c39-65788052f77a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useKerberosForPasswordAuthentication', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('95d4e634-504a-4ae3-927c-8194e2123075', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useTruststoreSpi', 'ldapsOnly');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('eb262a54-19e8-435c-9a9b-a7928dad5523', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userAccountControlsAfterPasswordUpdate', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b92fab53-8359-49e1-80be-73b7e7b568ef', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userObjectClasses', 'inetOrgPerson, organizationalPerson');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('72595a99-122f-4ffc-9ec3-3d3c9c3b0086', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usernameLDAPAttribute', 'uid');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('dc897955-7459-4d39-be93-9c6ea669fd91', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usersDn', 'dn');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a2561f0b-140c-4a18-8118-21da82293b2e', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'uuidLDAPAttribute', 'nsuniqueid');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('34a949bf-60ba-47fd-955b-a907496f3f2e', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'vendor', 'rhds');

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('f7876125-4881-4e0f-9a8e-cea0ce079972', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'creation date', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('bf15953b-fdd2-46a8-927a-60f75721182e', 'f7876125-4881-4e0f-9a8e-cea0ce079972', 'always.read.value.from.ldap', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('7016d6a3-b3f1-4f25-bc1e-9a6e0f5f50a9', 'f7876125-4881-4e0f-9a8e-cea0ce079972', 'is.mandatory.in.ldap', 'false');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('6a30b72f-a3d6-4ea9-af79-3c2bc30569cd', 'f7876125-4881-4e0f-9a8e-cea0ce079972', 'ldap.attribute', 'createTimestamp');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d3052300-1f46-4187-a4bd-9024761e89bc', 'f7876125-4881-4e0f-9a8e-cea0ce079972', 'read.only', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('0126903d-d39c-45ac-8883-1c258e433492', 'f7876125-4881-4e0f-9a8e-cea0ce079972', 'user.model.attribute', 'createTimestamp');

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='f7876125-4881-4e0f-9a8e-cea0ce079972';

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER WHERE ID='f7876125-4881-4e0f-9a8e-cea0ce079972';

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('91f10058-6902-4954-a8f0-d77584662d62', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'first name', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('cb557913-6218-44cd-84f0-bfdee37a9c44', '91f10058-6902-4954-a8f0-d77584662d62', 'always.read.value.from.ldap', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('102bf396-8ad8-4090-9da6-09d9a99a3f9d', '91f10058-6902-4954-a8f0-d77584662d62', 'is.mandatory.in.ldap', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('12389764-de30-4388-b199-61c5b512ec2d', '91f10058-6902-4954-a8f0-d77584662d62', 'ldap.attribute', 'cn');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('02afc85a-42ea-4eef-82a4-0923bfdf143e', '91f10058-6902-4954-a8f0-d77584662d62', 'read.only', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('579ea0da-45ab-4d43-8f82-7b980edaede3', '91f10058-6902-4954-a8f0-d77584662d62', 'user.model.attribute', 'firstName');

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='91f10058-6902-4954-a8f0-d77584662d62';

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER WHERE ID='91f10058-6902-4954-a8f0-d77584662d62';

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('1e3996e0-4dfb-4c26-a237-3f46bcb4b4c5', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'email', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('cba4413a-9dc7-4645-8800-f7ccbb1de8b8', '1e3996e0-4dfb-4c26-a237-3f46bcb4b4c5', 'always.read.value.from.ldap', 'false');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('943feba7-d958-40ee-9a48-94434063535a', '1e3996e0-4dfb-4c26-a237-3f46bcb4b4c5', 'is.mandatory.in.ldap', 'false');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('7b7aa02c-3e7e-42b9-8bbf-f896cb51680f', '1e3996e0-4dfb-4c26-a237-3f46bcb4b4c5', 'ldap.attribute', 'mail');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('dd091a85-b6c0-47d0-baba-d2d67454c740', '1e3996e0-4dfb-4c26-a237-3f46bcb4b4c5', 'read.only', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('79e9108a-81e8-4663-8513-4d6f6c309a5f', '1e3996e0-4dfb-4c26-a237-3f46bcb4b4c5', 'user.model.attribute', 'email');

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='1e3996e0-4dfb-4c26-a237-3f46bcb4b4c5';

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER WHERE ID='1e3996e0-4dfb-4c26-a237-3f46bcb4b4c5';

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('1e8cf959-9fb8-4b7f-b7f6-e94d1ccd2996', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'last name', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('92b080bd-0206-4f67-9051-42ae583ae553', '1e8cf959-9fb8-4b7f-b7f6-e94d1ccd2996', 'always.read.value.from.ldap', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('6c07429e-a08b-439c-8caf-1f3b2e4a940e', '1e8cf959-9fb8-4b7f-b7f6-e94d1ccd2996', 'is.mandatory.in.ldap', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ea4aa847-5983-4b68-9100-7fc0a92dc001', '1e8cf959-9fb8-4b7f-b7f6-e94d1ccd2996', 'ldap.attribute', 'sn');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('dc5b3c32-c26a-401c-92a4-225f12c72813', '1e8cf959-9fb8-4b7f-b7f6-e94d1ccd2996', 'read.only', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('95bf3bf3-f693-4c2d-851c-5fb1acaf3048', '1e8cf959-9fb8-4b7f-b7f6-e94d1ccd2996', 'user.model.attribute', 'lastName');

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='1e8cf959-9fb8-4b7f-b7f6-e94d1ccd2996';

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER WHERE ID='1e8cf959-9fb8-4b7f-b7f6-e94d1ccd2996';

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('db02026f-921d-4089-b6e5-04a86c576fdb', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'username', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a3ac515d-705c-4642-be00-b2ff180873b2', 'db02026f-921d-4089-b6e5-04a86c576fdb', 'always.read.value.from.ldap', 'false');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ca104f7f-aa0a-47e2-8e0a-92f4a459782a', 'db02026f-921d-4089-b6e5-04a86c576fdb', 'is.mandatory.in.ldap', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a84577e9-0884-47eb-9fbe-2f1d98a60231', 'db02026f-921d-4089-b6e5-04a86c576fdb', 'ldap.attribute', 'uid');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('fcd669af-503c-440a-91f3-5b55888c2a89', 'db02026f-921d-4089-b6e5-04a86c576fdb', 'read.only', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('44e4463a-0f4e-452d-a536-8a99084cb985', 'db02026f-921d-4089-b6e5-04a86c576fdb', 'user.model.attribute', 'username');

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='db02026f-921d-4089-b6e5-04a86c576fdb';

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER WHERE ID='db02026f-921d-4089-b6e5-04a86c576fdb';

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('532a942f-3077-452f-bbdf-c987d0cb9974', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'modify date', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('57988105-b52b-47d1-9c65-3ddc89b5ba61', '532a942f-3077-452f-bbdf-c987d0cb9974', 'always.read.value.from.ldap', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3ee8274b-560c-498c-afa4-bfb7e3c7e286', '532a942f-3077-452f-bbdf-c987d0cb9974', 'is.mandatory.in.ldap', 'false');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8db7c111-61a2-489f-a873-bb1a4a8bb62f', '532a942f-3077-452f-bbdf-c987d0cb9974', 'ldap.attribute', 'modifyTimestamp');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('7f41a0d1-2920-4299-af1a-25aa0f87f10e', '532a942f-3077-452f-bbdf-c987d0cb9974', 'read.only', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('046cddbc-8ff5-4e7b-8137-b6529d133269', '532a942f-3077-452f-bbdf-c987d0cb9974', 'user.model.attribute', 'modifyTimestamp');

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='532a942f-3077-452f-bbdf-c987d0cb9974';

DELETE FROM DBALLO07.USER_FEDERATION_MAPPER WHERE ID='532a942f-3077-452f-bbdf-c987d0cb9974';

DELETE FROM DBALLO07.USER_FEDERATION_CONFIG WHERE USER_FEDERATION_PROVIDER_ID='4dd39136-ae1f-4cb7-b769-ce97e1865aa6';

DELETE FROM DBALLO07.USER_FEDERATION_PROVIDER WHERE ID='4dd39136-ae1f-4cb7-b769-ce97e1865aa6';

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.4.0', 'bburke@redhat.com', 'META-INF/jpa-changelog-2.4.0.xml', SYSTIMESTAMP, 32, '7:454d604fbd755d9df3fd9c6329043aa5', 'customChange', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.5.0.xml::2.5.0::bburke@redhat.com
INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'Migration2', 'Migration2', 'ldap-provider', 'ldap', 'org.keycloak.storage.UserStorageProvider');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('153534ae-17d6-4c42-884e-4ce2436617fb', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'priority', '2');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('805923f9-2684-4d15-aff4-21290c5cdf5c', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'fullSyncPeriod', '-1');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a15cfdcd-85c2-4986-a5af-dae66ae1695d', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'changedSyncPeriod', '-1');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('108b4fbc-3807-4a9f-8e96-be42f8d1ff78', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'lastSync', '0');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f9c72ed4-f9bd-4513-9e4e-52bd2d45434e', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'allowKerberosAuthentication', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('39caa9df-224f-4ee6-a82c-e604f7b2d3ae', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'authType', 'none');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4458709f-b00e-4d24-8eab-1dc85cadfa4b', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'batchSizeForSync', '1001');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('82ce34d6-5ef2-495a-afe4-5e121fc2e3e8', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionPooling', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b0e62c6b-adb9-449d-ab25-35456a42504f', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionUrl', 'http://localhost');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('78905b2f-f5dd-45bc-aa48-f0fd81cc740c', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'debug', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('015d1655-49c6-4084-b9b2-3a94b4f346bd', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'editMode', 'READ_ONLY');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('341df0e5-bbeb-477a-b4c6-267bffde09ba', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'kerberosRealm', 'realm');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d3611443-3e03-4d28-8407-a7056d1746e6', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'keyTab', 'keytab');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('56366bb5-0785-4b24-af3e-120f8cca5f05', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'pagination', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('0ac158f3-93ed-400e-9d1f-b20cdbcaa480', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'rdnLDAPAttribute', 'uid');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8c5050e1-5abd-4f31-9268-97b469195d8a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'searchScope', '1');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('9ff99595-2fc5-4164-a142-145c096e9bd9', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'serverPrincipal', 'principal');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('823a6b91-d1ca-4d14-8ece-16d8e6b95767', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'syncRegistrations', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('2038ee7f-acc3-404f-bbc9-22767c17b2dd', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useKerberosForPasswordAuthentication', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('39f5b39f-e8b1-409e-afa4-b77c3bcfb03a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useTruststoreSpi', 'ldapsOnly');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('1968fffe-02eb-4c44-99c1-7ff05efce657', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userAccountControlsAfterPasswordUpdate', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('dd14371c-1d34-41ff-947e-55ce8cff2f54', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userObjectClasses', 'inetOrgPerson, organizationalPerson');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d1e66600-e253-4e75-ac52-84d4edfbb7a1', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usernameLDAPAttribute', 'uid');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('88fb2af3-54a8-497b-b7d5-c46c5bfb4eaa', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usersDn', 'dn');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('52e78a6b-4ba8-42e9-863d-998effb15f2d', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'uuidLDAPAttribute', 'nsuniqueid');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('92ffaf86-23c6-481f-b5cc-e6b8c7886107', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'vendor', 'rhds');

DELETE FROM DBALLO07.USER_FEDERATION_CONFIG WHERE USER_FEDERATION_PROVIDER_ID='4dd39136-ae1f-4cb7-b769-ce97e1865aa6';

DELETE FROM DBALLO07.USER_FEDERATION_PROVIDER WHERE ID='4dd39136-ae1f-4cb7-b769-ce97e1865aa6';

INSERT INTO DBALLO07.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'Migration2', 'Migration2', 'kerberos-provider', 'kerberos', 'org.keycloak.storage.UserStorageProvider');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('df59e19b-56a5-416d-bd1a-8b56846d564b', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'priority', '3');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('19ef5ac8-5276-4ff9-a660-55336903d597', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'fullSyncPeriod', '0');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('223eda83-d3ee-4f03-9ea3-bc9bc6b27769', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'changedSyncPeriod', '0');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('9c4be2b7-3db2-4e58-b5c4-f0a99f48e7c1', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'lastSync', '0');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3e04d47f-d528-4422-8bea-40a30ef3e76d', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'allowKerberosAuthentication', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('fd80cbca-3044-4aaa-b611-b38b214a7c18', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'allowPasswordAuthentication', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4a8a8121-36d7-4fee-a2cc-5e0301821be7', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'debug', 'true');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('61bc2884-034c-49a5-a15a-aa5f02db6bb8', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'editMode', 'READ_ONLY');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4ad38803-af5c-45f4-bbf0-6328ca3e4e6f', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'kerberosRealm', 'realm');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d8aa9ad9-c4e4-47ce-bbb3-b845e8fb8e12', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'keyTab', 'keytab');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('0028fe71-bf8e-4268-82f4-9a48ab5bfe60', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'serverPrincipal', 'principal');

INSERT INTO DBALLO07.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a1c2852b-ec62-48bd-a241-d10bbaf79d63', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'updateProfileFirstLogin', 'true');

DELETE FROM DBALLO07.USER_FEDERATION_CONFIG WHERE USER_FEDERATION_PROVIDER_ID='03b669fa-f86f-42fb-b4a4-88315b3ebeb6';

DELETE FROM DBALLO07.USER_FEDERATION_PROVIDER WHERE ID='03b669fa-f86f-42fb-b4a4-88315b3ebeb6';

ALTER TABLE DBALLO07.OFFLINE_USER_SESSION MODIFY USER_ID VARCHAR2(255);

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.5.0', 'bburke@redhat.com', 'META-INF/jpa-changelog-2.5.0.xml', SYSTIMESTAMP, 33, '7:57e98a3077e29caf562f7dbf80c72600', 'customChange, modifyDataType', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.5.0.xml::2.5.0-unicode-oracle::hmlnarik@redhat.com
ALTER TABLE DBALLO07.AUTHENTICATION_FLOW MODIFY DESCRIPTION NVARCHAR2(255);

ALTER TABLE DBALLO07.CLIENT_TEMPLATE MODIFY DESCRIPTION NVARCHAR2(255);

ALTER TABLE DBALLO07.RESOURCE_SERVER_POLICY MODIFY DESCRIPTION NVARCHAR2(255);

ALTER TABLE DBALLO07.CLIENT MODIFY DESCRIPTION NVARCHAR2(255);

ALTER TABLE DBALLO07.CLIENT MODIFY NAME NVARCHAR2(255);

ALTER TABLE DBALLO07.USER_ENTITY MODIFY FIRST_NAME NVARCHAR2(255);

ALTER TABLE DBALLO07.USER_ENTITY MODIFY LAST_NAME NVARCHAR2(255);

ALTER TABLE DBALLO07.USER_ENTITY MODIFY USERNAME NVARCHAR2(255);

ALTER TABLE DBALLO07.USERNAME_LOGIN_FAILURE MODIFY USERNAME NVARCHAR2(255);

ALTER TABLE DBALLO07.KEYCLOAK_GROUP MODIFY NAME NVARCHAR2(255);

ALTER TABLE DBALLO07.USER_ATTRIBUTE MODIFY VALUE NVARCHAR2(255);

ALTER TABLE DBALLO07.GROUP_ATTRIBUTE MODIFY VALUE NVARCHAR2(255);

ALTER TABLE DBALLO07.REALM_ATTRIBUTE MODIFY VALUE NVARCHAR2(255);

ALTER TABLE DBALLO07.COMPONENT_CONFIG ADD VALUE_NEW NCLOB;

UPDATE COMPONENT_CONFIG SET VALUE_NEW = VALUE, VALUE = NULL;

ALTER TABLE DBALLO07.COMPONENT_CONFIG DROP COLUMN VALUE;

ALTER TABLE DBALLO07.COMPONENT_CONFIG RENAME COLUMN VALUE_NEW TO VALUE;

ALTER TABLE DBALLO07.KEYCLOAK_ROLE MODIFY NAME NVARCHAR2(255);

ALTER TABLE DBALLO07.KEYCLOAK_ROLE MODIFY DESCRIPTION NVARCHAR2(255);

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.5.0-unicode-oracle', 'hmlnarik@redhat.com', 'META-INF/jpa-changelog-2.5.0.xml', SYSTIMESTAMP, 34, '7:e4c7e8f2256210aee71ddc42f538b57a', 'modifyDataType (x13), addColumn, sql, dropColumn, renameColumn, modifyDataType (x2)', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.5.0.xml::2.5.0-unicode-other-dbs::hmlnarik@redhat.com
INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.5.0-unicode-other-dbs', 'hmlnarik@redhat.com', 'META-INF/jpa-changelog-2.5.0.xml', SYSTIMESTAMP, 35, '7:09a43c97e49bc626460480aa1379b522', 'modifyDataType (x5), dropUniqueConstraint, modifyDataType (x3), addUniqueConstraint, dropPrimaryKey, modifyDataType, addNotNullConstraint, addPrimaryKey, modifyDataType (x5), dropUniqueConstraint, modifyDataType, addUniqueConstraint, modifyDataType', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.5.0.xml::2.5.0-duplicate-email-support::slawomir@dabek.name
ALTER TABLE DBALLO07.REALM ADD LOGIN_WITH_EMAIL_ALLOWED NUMBER(1) DEFAULT 1 NOT NULL;

ALTER TABLE DBALLO07.REALM ADD DUPLICATE_EMAILS_ALLOWED NUMBER(1) DEFAULT 0 NOT NULL;

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.5.0-duplicate-email-support', 'slawomir@dabek.name', 'META-INF/jpa-changelog-2.5.0.xml', SYSTIMESTAMP, 36, '7:26bfc7c74fefa9126f2ce702fb775553', 'addColumn', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.5.0.xml::2.5.0-unique-group-names::hmlnarik@redhat.com
ALTER TABLE DBALLO07.KEYCLOAK_GROUP ADD CONSTRAINT SIBLING_NAMES UNIQUE (REALM_ID, PARENT_GROUP, NAME);

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.5.0-unique-group-names', 'hmlnarik@redhat.com', 'META-INF/jpa-changelog-2.5.0.xml', SYSTIMESTAMP, 37, '7:a161e2ae671a9020fff61e996a207377', 'addUniqueConstraint', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.5.1.xml::2.5.1::bburke@redhat.com
ALTER TABLE DBALLO07.FED_USER_CONSENT ADD CREATED_DATE NUMBER(38, 0);

ALTER TABLE DBALLO07.FED_USER_CONSENT ADD LAST_UPDATED_DATE NUMBER(38, 0);

INSERT INTO DBALLO07.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('2.5.1', 'bburke@redhat.com', 'META-INF/jpa-changelog-2.5.1.xml', SYSTIMESTAMP, 38, '7:37fc1781855ac5388c494f1442b3f717', 'addColumn', '', 'EXECUTED', NULL, NULL, '3.4.1');

-- *********************************************************************
-- * Keycloak database creation script - apply this script to empty DB *
-- *********************************************************************

CREATE TABLE DBALLO07.DATABASECHANGELOG_EXAMPLE_EN (ID VARCHAR2(255) NOT NULL, AUTHOR VARCHAR2(255) NOT NULL, FILENAME VARCHAR2(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED NUMBER(10) NOT NULL, EXECTYPE VARCHAR2(10) NOT NULL, MD5SUM VARCHAR2(35), DESCRIPTION VARCHAR2(255), COMMENTS VARCHAR2(255), TAG VARCHAR2(255), LIQUIBASE VARCHAR2(20), CONTEXTS VARCHAR2(255), LABELS VARCHAR2(255));

-- *********************************************************************

-- *********************************************************************
-- Update Database Script
-- *********************************************************************
-- Change Log: META-INF/example-changelog.xml
-- Ran at: 2/1/17 7:55 AM
-- Against: DBALLO07@jdbc:oracle:thin:@db-11.rhev-ci-vms.eng.rdu2.redhat.com:1521:orcl
-- Liquibase version: 3.4.1
-- *********************************************************************



-- Changeset META-INF/example-changelog.xml::example-1.0::erik.mulder@docdatapayments.com
CREATE TABLE DBALLO07.EXAMPLE_COMPANY (ID VARCHAR2(36) NOT NULL, NAME VARCHAR2(255) NOT NULL, REALM_ID VARCHAR2(36) NOT NULL);

ALTER TABLE DBALLO07.EXAMPLE_COMPANY ADD CONSTRAINT PK_COMPANY PRIMARY KEY (ID);

INSERT INTO DBALLO07.DATABASECHANGELOG_EXAMPLE_EN (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('example-1.0', 'erik.mulder@docdatapayments.com', 'META-INF/example-changelog.xml', SYSTIMESTAMP, 1, '7:4eb040a6f792db674a0fdd7c79db2cc3', 'createTable, addPrimaryKey', '', 'EXECUTED', NULL, NULL, '3.4.1');

