-- *********************************************************************
-- Update Database Script
-- *********************************************************************
-- Change Log: META-INF/jpa-changelog-master.xml
-- Ran at: 2/1/17 7:55 AM
-- Against: dballo02@jdbc:db2://db-19.rhev-ci-vms.eng.rdu2.redhat.com:50000/cidb
-- Liquibase version: 3.4.1
-- *********************************************************************

-- Changeset META-INF/jpa-changelog-1.0.0.Final.xml::1.0.0.Final::sthorger@redhat.com
INSERT INTO DBALLO02.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.0.0.Final', 'sthorger@redhat.com', 'META-INF/jpa-changelog-1.0.0.Final.xml', CURRENT TIMESTAMP, 20, '7:00a57f7a6fb456639b34e62972e0ec02', 'createTable (x29), addPrimaryKey (x21), addUniqueConstraint (x9), addForeignKeyConstraint (x32)', '', 'MARK_RAN', NULL, NULL, '3.4.1');

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

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

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

-- Changeset META-INF/jpa-changelog-1.8.0.xml::1.8.0::mposolda@redhat.com
INSERT INTO DBALLO02.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.8.0', 'mposolda@redhat.com', 'META-INF/jpa-changelog-1.8.0.xml', CURRENT TIMESTAMP, 24, '7:c31d1646dfa2618a9335c00e07f89f24', '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/jpa-changelog-1.8.0.xml::1.8.0-2::keycloak
INSERT INTO DBALLO02.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.8.0-2', 'keycloak', 'META-INF/jpa-changelog-1.8.0.xml', CURRENT TIMESTAMP, 25, '7:df8bc21027a4f7cbbb01f6344e89ce07', 'dropDefaultValue, update', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-1.9.1.xml::1.9.1::keycloak
INSERT INTO DBALLO02.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE) VALUES ('1.9.1', 'keycloak', 'META-INF/jpa-changelog-1.9.1.xml', CURRENT TIMESTAMP, 26, '7:80b5db88a5dda36ece5f235be8757615', 'modifyDataType (x3)', '', '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 DBALLO02.RESOURCE_SERVER (ID VARCHAR(36) NOT NULL, CLIENT_ID VARCHAR(36) NOT NULL, ALLOW_RS_REMOTE_MGMT SMALLINT DEFAULT 0 NOT NULL, POLICY_ENFORCE_MODE VARCHAR(15) NOT NULL);

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.RESOURCE_SERVER');

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

CREATE TABLE DBALLO02.RESOURCE_SERVER_RESOURCE (ID VARCHAR(36) NOT NULL, NAME VARCHAR(255) NOT NULL, URI VARCHAR(255), "TYPE" VARCHAR(255), ICON_URI VARCHAR(255), OWNER VARCHAR(36) NOT NULL, RESOURCE_SERVER_ID VARCHAR(36) NOT NULL);

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.RESOURCE_SERVER_RESOURCE');

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

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

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

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.RESOURCE_SERVER_SCOPE');

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

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

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

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.RESOURCE_SERVER_POLICY');

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

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

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

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.POLICY_CONFIG');

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

CREATE TABLE DBALLO02.RESOURCE_SCOPE (RESOURCE_ID VARCHAR(36) NOT NULL, SCOPE_ID VARCHAR(36) NOT NULL);

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.RESOURCE_SCOPE');

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

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

CREATE TABLE DBALLO02.RESOURCE_POLICY (RESOURCE_ID VARCHAR(36) NOT NULL, POLICY_ID VARCHAR(36) NOT NULL);

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.RESOURCE_POLICY');

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

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

CREATE TABLE DBALLO02.SCOPE_POLICY (SCOPE_ID VARCHAR(36) NOT NULL, POLICY_ID VARCHAR(36) NOT NULL);

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.SCOPE_POLICY');

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

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

CREATE TABLE DBALLO02.ASSOCIATED_POLICY (POLICY_ID VARCHAR(36) NOT NULL, ASSOCIATED_POLICY_ID VARCHAR(36) NOT NULL);

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.ASSOCIATED_POLICY');

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

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

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 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 DBALLO02.RESOURCE_SERVER_POLICY SET "TYPE" = 'rules' WHERE TYPE = 'drools';

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 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 DBALLO02.BROKER_LINK (IDENTITY_PROVIDER VARCHAR(255) NOT NULL, STORAGE_PROVIDER_ID VARCHAR(255), REALM_ID VARCHAR(36) NOT NULL, BROKER_USER_ID VARCHAR(255), BROKER_USERNAME VARCHAR(255), TOKEN CLOB, USER_ID VARCHAR(255) NOT NULL);

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

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

CREATE TABLE DBALLO02.FED_USER_CONSENT_ROLE (USER_CONSENT_ID VARCHAR(36) NOT NULL, ROLE_ID VARCHAR(36) NOT NULL);

CREATE TABLE DBALLO02.FED_USER_CONSENT_PROT_MAPPER (USER_CONSENT_ID VARCHAR(36) NOT NULL, PROTOCOL_MAPPER_ID VARCHAR(36) NOT NULL);

CREATE TABLE DBALLO02.FED_USER_CREDENTIAL (ID VARCHAR(36) NOT NULL, DEVICE VARCHAR(255), HASH_ITERATIONS INTEGER, SALT BLOB(16), "TYPE" VARCHAR(255), VALUE VARCHAR(255), CREATED_DATE BIGINT, COUNTER INTEGER DEFAULT 0, DIGITS INTEGER DEFAULT 6, PERIOD INTEGER DEFAULT 30, ALGORITHM VARCHAR(36) DEFAULT 'HmacSHA1', USER_ID VARCHAR(255) NOT NULL, REALM_ID VARCHAR(36) NOT NULL, STORAGE_PROVIDER_ID VARCHAR(36));

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

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

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

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

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

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.BROKER_LINK');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_ATTRIBUTE');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_CONSENT');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_CONSENT_ROLE');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_CONSENT_PROT_MAPPER');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_CREDENTIAL');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_GROUP_MEMBERSHIP');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_ROLE_MAPPING');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_REQUIRED_ACTION');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.COMPONENT');

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.COMPONENT_CONFIG');

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

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

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 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 DBALLO02.ADMIN_EVENT_ENTITY ADD RESOURCE_TYPE VARCHAR(64);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.ADMIN_EVENT_ENTITY');

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

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

ALTER TABLE DBALLO02.CREDENTIAL ALTER COLUMN VALUE SET DATA TYPE VARCHAR(4000);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.CREDENTIAL');

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

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

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 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 DBALLO02.FEDERATED_USER (ID VARCHAR(255) NOT NULL, STORAGE_PROVIDER_ID VARCHAR(255), REALM_ID VARCHAR(36) NOT NULL);

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FEDERATED_USER');

ALTER TABLE DBALLO02.USER_ENTITY ALTER COLUMN TOTP DROP DEFAULT;

ALTER TABLE DBALLO02.USER_ENTITY DROP COLUMN TOTP;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USER_ENTITY');

ALTER TABLE DBALLO02.IDENTITY_PROVIDER ADD PROVIDER_DISPLAY_NAME VARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.IDENTITY_PROVIDER');

ALTER TABLE DBALLO02.COMPONENT ADD SUB_TYPE VARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.COMPONENT');

INSERT INTO DBALLO02.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('40701365-f239-4478-a629-07cfd51507e0', 'master', 'master', 'rsa', 'rsa', 'org.keycloak.keys.KeyProvider');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d96d5e2a-63db-4dea-8937-079b428ad2f3', '40701365-f239-4478-a629-07cfd51507e0', 'priority', '100');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4d69080c-ffc0-4e52-8a3c-778623272362', '40701365-f239-4478-a629-07cfd51507e0', '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 DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('2fed86ab-841e-40a2-904c-8b5741e849d1', '40701365-f239-4478-a629-07cfd51507e0', '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 DBALLO02.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('d8ba20ef-1ec0-4f4c-a0d7-4387256e093c', 'Migration', 'Migration', 'rsa', 'rsa', 'org.keycloak.keys.KeyProvider');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c70d5222-4fb4-40ed-aebe-ca93396e859a', 'd8ba20ef-1ec0-4f4c-a0d7-4387256e093c', 'priority', '100');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('17641dad-a7b3-4e65-9b82-bb4b8d7f1d59', 'd8ba20ef-1ec0-4f4c-a0d7-4387256e093c', '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 DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('26f88f9c-cd07-4a0b-ad83-33a8e430425c', 'd8ba20ef-1ec0-4f4c-a0d7-4387256e093c', '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 DBALLO02.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('dfd7f931-dba5-4c4f-b331-9ff8d017746e', 'Migration2', 'Migration2', 'rsa', 'rsa', 'org.keycloak.keys.KeyProvider');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('97793e1b-5306-455f-8caf-1e638af7ecb5', 'dfd7f931-dba5-4c4f-b331-9ff8d017746e', 'priority', '100');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b8fcbd21-e83f-4616-b1a6-d27037f3200c', 'dfd7f931-dba5-4c4f-b331-9ff8d017746e', '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 DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('830d9974-2fe5-457d-a538-bf671aa27b1b', 'dfd7f931-dba5-4c4f-b331-9ff8d017746e', '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 DBALLO02.REALM DROP COLUMN CODE_SECRET;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.REALM');

ALTER TABLE DBALLO02.REALM DROP COLUMN PRIVATE_KEY;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.REALM');

ALTER TABLE DBALLO02.REALM DROP COLUMN PUBLIC_KEY;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.REALM');

ALTER TABLE DBALLO02.REALM DROP COLUMN CERTIFICATE;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.REALM');

ALTER TABLE DBALLO02.USER_CONSENT ADD CREATED_DATE BIGINT;

ALTER TABLE DBALLO02.USER_CONSENT ADD LAST_UPDATED_DATE BIGINT;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USER_CONSENT');

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USER_CONSENT');

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 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 DBALLO02.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 DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('58750123-1cde-4010-b307-e87600509c6b', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'priority', '2');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8556d949-0e72-47d9-884e-68a3c4756fd5', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'fullSyncPeriod', '-1');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a3a4fadf-24f2-49bd-86e0-16997c23a288', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'changedSyncPeriod', '-1');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a610b187-3b5b-4dfc-895c-a79519cc9d24', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'lastSync', '0');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3c34066a-7f2f-4b4d-82bc-a9e93c2ece6f', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'allowKerberosAuthentication', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('facd8c93-cc48-41a2-89a7-e7766033e619', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'authType', 'none');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4d79d21f-fc7f-4bc2-bdb0-02112975d7d4', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'batchSizeForSync', '1001');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('946b1931-2ef6-42f4-970e-c1878e44c803', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionPooling', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('2e614d37-d6ac-4718-80a7-62b7f08dbb84', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionUrl', 'http://localhost');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('0d659f19-412e-422d-a47f-696c7329c924', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'debug', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('7a3f0b78-68a8-4afe-adac-84898a9e6d7c', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'editMode', 'READ_ONLY');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('098d9d5e-05fc-4192-aefb-2f3b1436d395', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'kerberosRealm', 'realm');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c0c4a390-b4aa-47f5-82c0-593cb12254a4', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'keyTab', 'keytab');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ab577eb3-5bb1-4fda-b89e-70cbbc9e1f80', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'pagination', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f8286a70-f044-46b7-90b5-5244ea70f29e', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'rdnLDAPAttribute', 'uid');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b27bb621-6847-4bf9-a7bf-daf8b0186c60', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'searchScope', '1');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b9d15eb9-9e0d-4158-9338-9dfba2db1a83', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'serverPrincipal', 'principal');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e416466f-0d4f-46d8-b0ad-81cf3e06a1c1', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'syncRegistrations', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('077b8ba2-74e3-4a38-a7de-b26c475b016f', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useKerberosForPasswordAuthentication', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('9eef290a-5f8e-46d1-b5c0-4c71ed82ffac', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useTruststoreSpi', 'ldapsOnly');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('1d5b7e8e-dbd5-449b-a894-7f513d720025', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userAccountControlsAfterPasswordUpdate', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a5ae88ed-e6b4-4075-8307-843c343d66ec', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userObjectClasses', 'inetOrgPerson, organizationalPerson');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('9a58ccb2-3c77-459b-8025-b6fe1a76986d', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usernameLDAPAttribute', 'uid');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ec9ac54a-ed87-4456-8fed-7fc5278022db', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usersDn', 'dn');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('48a4dc36-7b5b-4a1e-9a89-0957c03d230a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'uuidLDAPAttribute', 'nsuniqueid');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('46c74a01-14c8-4f47-9836-21a865d82d62', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'vendor', 'rhds');

INSERT INTO DBALLO02.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('15adf244-c7d9-4dfc-9544-4c3075ac2152', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'email', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('42af53b1-81ee-4b80-b216-36e69d35addf', '15adf244-c7d9-4dfc-9544-4c3075ac2152', 'always.read.value.from.ldap', 'false');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e57b567e-61ad-4683-bc5c-89c8d257d1d6', '15adf244-c7d9-4dfc-9544-4c3075ac2152', 'is.mandatory.in.ldap', 'false');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('10e4cab6-d395-40b4-9474-f49cdc5214d8', '15adf244-c7d9-4dfc-9544-4c3075ac2152', 'ldap.attribute', 'mail');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('bdbffa4f-3fe6-452c-b126-649186b749fb', '15adf244-c7d9-4dfc-9544-4c3075ac2152', 'read.only', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f6362b3a-fb11-4021-9cad-c24434eb4da0', '15adf244-c7d9-4dfc-9544-4c3075ac2152', 'user.model.attribute', 'email');

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='15adf244-c7d9-4dfc-9544-4c3075ac2152';

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER WHERE ID='15adf244-c7d9-4dfc-9544-4c3075ac2152';

INSERT INTO DBALLO02.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('16293741-299c-4f88-82f2-215bf61ed851', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'last name', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('053f1b1a-4bda-4a1f-91a5-7cc6fbe6b73d', '16293741-299c-4f88-82f2-215bf61ed851', 'always.read.value.from.ldap', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ecf50aba-66f5-4c35-8f06-5db09b2449b6', '16293741-299c-4f88-82f2-215bf61ed851', 'is.mandatory.in.ldap', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('7af6cdbf-b4e2-41bc-be65-e8091cb33af0', '16293741-299c-4f88-82f2-215bf61ed851', 'ldap.attribute', 'sn');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('82f24d29-a4ee-4dc8-8849-4d8c78a6bc99', '16293741-299c-4f88-82f2-215bf61ed851', 'read.only', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c55cafd6-5cd4-423a-a2fc-fc380bdd5c52', '16293741-299c-4f88-82f2-215bf61ed851', 'user.model.attribute', 'lastName');

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='16293741-299c-4f88-82f2-215bf61ed851';

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER WHERE ID='16293741-299c-4f88-82f2-215bf61ed851';

INSERT INTO DBALLO02.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('4d2f18fb-3de8-4212-9cfa-dc6eaec64771', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'first name', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('96ed7a32-c855-41cb-97a3-e0f5cffe39b4', '4d2f18fb-3de8-4212-9cfa-dc6eaec64771', 'always.read.value.from.ldap', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c484367c-0266-4d9f-b48f-66e3a29bdfe9', '4d2f18fb-3de8-4212-9cfa-dc6eaec64771', 'is.mandatory.in.ldap', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('0055c78f-d4b2-4068-be86-ac73c3f78e44', '4d2f18fb-3de8-4212-9cfa-dc6eaec64771', 'ldap.attribute', 'cn');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('74a8ddac-d2a1-4510-9522-b4dcaee89c4d', '4d2f18fb-3de8-4212-9cfa-dc6eaec64771', 'read.only', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('698fa3e8-645b-42f2-807c-0019fc01890a', '4d2f18fb-3de8-4212-9cfa-dc6eaec64771', 'user.model.attribute', 'firstName');

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='4d2f18fb-3de8-4212-9cfa-dc6eaec64771';

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER WHERE ID='4d2f18fb-3de8-4212-9cfa-dc6eaec64771';

INSERT INTO DBALLO02.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('8002bbae-1b68-479c-9cca-1566f4841f21', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'creation date', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('31e51240-f4c7-4a58-9303-51a9281b12b5', '8002bbae-1b68-479c-9cca-1566f4841f21', 'always.read.value.from.ldap', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('cc1ea895-ae05-4c76-ab18-392c98c7c8c6', '8002bbae-1b68-479c-9cca-1566f4841f21', 'is.mandatory.in.ldap', 'false');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('0a07ae07-e9e5-427f-b2de-2ba96447ea58', '8002bbae-1b68-479c-9cca-1566f4841f21', 'ldap.attribute', 'createTimestamp');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('6e54e779-cab4-4a3a-a046-6c198040f023', '8002bbae-1b68-479c-9cca-1566f4841f21', 'read.only', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('620c5fa4-ad91-4a32-86af-a87b080840a8', '8002bbae-1b68-479c-9cca-1566f4841f21', 'user.model.attribute', 'createTimestamp');

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='8002bbae-1b68-479c-9cca-1566f4841f21';

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER WHERE ID='8002bbae-1b68-479c-9cca-1566f4841f21';

INSERT INTO DBALLO02.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('b643818d-ea33-45b6-9501-e5b871f32cc9', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'modify date', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ecf10291-ec0b-4c36-95a3-0869a9c1b56a', 'b643818d-ea33-45b6-9501-e5b871f32cc9', 'always.read.value.from.ldap', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('06373346-859d-4e7d-9703-8a1182631bca', 'b643818d-ea33-45b6-9501-e5b871f32cc9', 'is.mandatory.in.ldap', 'false');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8218f8b4-f9bb-4cbe-972c-fa1285082609', 'b643818d-ea33-45b6-9501-e5b871f32cc9', 'ldap.attribute', 'modifyTimestamp');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('39f8efe3-3a09-4870-a33d-9fa63bb7aac3', 'b643818d-ea33-45b6-9501-e5b871f32cc9', 'read.only', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c9bfac50-0191-4a84-aed4-62356ac5b8c1', 'b643818d-ea33-45b6-9501-e5b871f32cc9', 'user.model.attribute', 'modifyTimestamp');

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='b643818d-ea33-45b6-9501-e5b871f32cc9';

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER WHERE ID='b643818d-ea33-45b6-9501-e5b871f32cc9';

INSERT INTO DBALLO02.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('d4cd3864-21e2-43c2-88ca-0b9e58b5300d', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'username', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('695013a5-f3ce-44f6-ad40-97f214bae5b5', 'd4cd3864-21e2-43c2-88ca-0b9e58b5300d', 'always.read.value.from.ldap', 'false');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d06ec4b2-88fd-4744-b93a-96277a5c3574', 'd4cd3864-21e2-43c2-88ca-0b9e58b5300d', 'is.mandatory.in.ldap', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d2fafbb0-116b-4d08-93a9-96c1a4094686', 'd4cd3864-21e2-43c2-88ca-0b9e58b5300d', 'ldap.attribute', 'uid');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('da27fc8a-6e72-4fdd-9f43-07d85b32498a', 'd4cd3864-21e2-43c2-88ca-0b9e58b5300d', 'read.only', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('593f6a28-1689-4346-a9c5-82986413f9cc', 'd4cd3864-21e2-43c2-88ca-0b9e58b5300d', 'user.model.attribute', 'username');

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='d4cd3864-21e2-43c2-88ca-0b9e58b5300d';

DELETE FROM DBALLO02.USER_FEDERATION_MAPPER WHERE ID='d4cd3864-21e2-43c2-88ca-0b9e58b5300d';

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

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

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 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 DBALLO02.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 DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('9ca8668b-f3d6-4a31-a24d-1f114d62db0c', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'priority', '2');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f474b2d0-b8fa-4455-a212-b50a7af8dc53', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'fullSyncPeriod', '-1');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c81fa09c-ca06-4b55-96a5-d3f9d99f6892', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'changedSyncPeriod', '-1');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a2d7f431-2e65-40ee-b121-0bd28f4005e5', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'lastSync', '0');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d0c4e6ce-fcd2-4e1c-bff8-a40846891323', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'allowKerberosAuthentication', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('733ada0c-6a4a-441b-8762-74c18b919c49', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'authType', 'none');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8022e189-f47b-4668-9683-429f523a4f4a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'batchSizeForSync', '1001');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('0218b82f-ae14-4702-96d3-bbfecb0235d7', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionPooling', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('0db29c52-5fec-4533-96a7-9b3b1b0089e8', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionUrl', 'http://localhost');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f106ae73-f444-441d-9c8d-9fd3c027a9d9', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'debug', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('bf668fba-50af-48dc-ba3f-a8d79e24d0ab', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'editMode', 'READ_ONLY');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ea63db1c-b46d-4b74-933c-805e1fc1f6f0', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'kerberosRealm', 'realm');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f037bd21-fa03-44a2-838f-0784475f3fbb', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'keyTab', 'keytab');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e5fa67b3-46a7-481c-a806-c8f0b997b75a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'pagination', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d31b7e5d-7a18-42ef-8e5b-29f43fd8f1e4', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'rdnLDAPAttribute', 'uid');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('67efbbbd-d5bd-4fea-a2ac-de1b75935001', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'searchScope', '1');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('df1b003e-5a04-4da2-b9d7-2ca3c24f3f03', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'serverPrincipal', 'principal');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ff00c9b0-3b51-4b8d-b907-9b3936a0ec1a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'syncRegistrations', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e6c1419a-b897-4469-a7ce-25a7bdf2322b', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useKerberosForPasswordAuthentication', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('90561bba-e12b-4ce5-84fd-d478d3fe6544', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useTruststoreSpi', 'ldapsOnly');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('142e8331-047c-42e1-9353-8c310724eb31', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userAccountControlsAfterPasswordUpdate', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f10fcd1c-5b72-455a-b0de-a87eda29be3d', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userObjectClasses', 'inetOrgPerson, organizationalPerson');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('eee62074-d755-4615-a782-bcb968dbb1ec', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usernameLDAPAttribute', 'uid');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8fafacc9-8871-4bad-9f65-9526850c5698', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usersDn', 'dn');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('dffbb520-e742-41bf-809f-da6195665af4', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'uuidLDAPAttribute', 'nsuniqueid');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('284d0348-f9da-42df-b5ad-99dd421ecad9', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'vendor', 'rhds');

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

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

INSERT INTO DBALLO02.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 DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b2ea55d4-e575-4987-a940-33ade94bf89e', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'priority', '3');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a6183b0d-ad60-428d-ab63-170f248f9284', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'fullSyncPeriod', '0');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c73935d9-9d0a-4735-a5e4-d747ad6e43a9', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'changedSyncPeriod', '0');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d061c10f-b68a-466b-a4df-7bbdd89d2b8e', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'lastSync', '0');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('089841a9-dd7a-4fb6-b670-53b863e467ea', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'allowKerberosAuthentication', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d6e22c36-2970-450c-b2d5-f5c19827acee', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'allowPasswordAuthentication', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('21c292e8-27e0-4728-8f88-d88e822bd2da', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'debug', 'true');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('471fc33c-88ff-4e98-9588-bc51719b8438', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'editMode', 'READ_ONLY');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b4d5b7e8-ddb1-427c-822e-ff324d66c07e', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'kerberosRealm', 'realm');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('1e82578a-2805-472f-81f9-9fea66b8d005', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'keyTab', 'keytab');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b36c24c3-c632-4e42-a4c7-4bbf4bf52af0', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'serverPrincipal', 'principal');

INSERT INTO DBALLO02.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4e3c0768-bd5e-4a77-84bc-587ca1ada7f3', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'updateProfileFirstLogin', 'true');

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

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

ALTER TABLE DBALLO02.OFFLINE_USER_SESSION ALTER COLUMN USER_ID SET DATA TYPE VARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.OFFLINE_USER_SESSION');

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 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
INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 34, '7:e4c7e8f2256210aee71ddc42f538b57a', 'modifyDataType (x13), addColumn, sql, dropColumn, renameColumn, modifyDataType (x2)', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.5.0.xml::2.5.0-unicode-other-dbs::hmlnarik@redhat.com
ALTER TABLE DBALLO02.AUTHENTICATION_FLOW ALTER COLUMN DESCRIPTION SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.AUTHENTICATION_FLOW');

ALTER TABLE DBALLO02.CLIENT_TEMPLATE ALTER COLUMN DESCRIPTION SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.CLIENT_TEMPLATE');

ALTER TABLE DBALLO02.RESOURCE_SERVER_POLICY ALTER COLUMN DESCRIPTION SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.RESOURCE_SERVER_POLICY');

ALTER TABLE DBALLO02.CLIENT ALTER COLUMN DESCRIPTION SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.CLIENT');

ALTER TABLE DBALLO02.CLIENT ALTER COLUMN NAME SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.CLIENT');

ALTER TABLE DBALLO02.USER_ENTITY DROP CONSTRAINT UK_RU8TT6T700S9V50BU18WS5HA6;

ALTER TABLE DBALLO02.USER_ENTITY ALTER COLUMN FIRST_NAME SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USER_ENTITY');

ALTER TABLE DBALLO02.USER_ENTITY ALTER COLUMN LAST_NAME SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USER_ENTITY');

ALTER TABLE DBALLO02.USER_ENTITY ALTER COLUMN USERNAME SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USER_ENTITY');

ALTER TABLE DBALLO02.USER_ENTITY ADD CONSTRAINT UK_RU8TT6T700S9V50BU18WS5HA6 UNIQUE (REALM_ID, USERNAME);

ALTER TABLE DBALLO02.USERNAME_LOGIN_FAILURE DROP PRIMARY KEY;

ALTER TABLE DBALLO02.USERNAME_LOGIN_FAILURE ALTER COLUMN USERNAME SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USERNAME_LOGIN_FAILURE');

ALTER TABLE DBALLO02.USERNAME_LOGIN_FAILURE ALTER COLUMN  USERNAME SET NOT NULL;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USERNAME_LOGIN_FAILURE');

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USERNAME_LOGIN_FAILURE');

ALTER TABLE DBALLO02.USERNAME_LOGIN_FAILURE ADD CONSTRAINT "CONSTRAINT_17-2" PRIMARY KEY (REALM_ID, USERNAME);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USERNAME_LOGIN_FAILURE');

ALTER TABLE DBALLO02.KEYCLOAK_GROUP ALTER COLUMN NAME SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.KEYCLOAK_GROUP');

ALTER TABLE DBALLO02.USER_ATTRIBUTE ALTER COLUMN VALUE SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.USER_ATTRIBUTE');

ALTER TABLE DBALLO02.GROUP_ATTRIBUTE ALTER COLUMN VALUE SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.GROUP_ATTRIBUTE');

ALTER TABLE DBALLO02.REALM_ATTRIBUTE ALTER COLUMN VALUE SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.REALM_ATTRIBUTE');

ALTER TABLE DBALLO02.COMPONENT_CONFIG ALTER COLUMN VALUE SET DATA TYPE NVARCHAR(4000);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.COMPONENT_CONFIG');

ALTER TABLE DBALLO02.KEYCLOAK_ROLE DROP CONSTRAINT "UK_J3RWUVD56ONTGSUHOGM184WW2-2";

ALTER TABLE DBALLO02.KEYCLOAK_ROLE ALTER COLUMN NAME SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.KEYCLOAK_ROLE');

ALTER TABLE DBALLO02.KEYCLOAK_ROLE ADD CONSTRAINT "UK_J3RWUVD56ONTGSUHOGM184WW2-2" UNIQUE (NAME, CLIENT_REALM_CONSTRAINT);

ALTER TABLE DBALLO02.KEYCLOAK_ROLE ALTER COLUMN DESCRIPTION SET DATA TYPE NVARCHAR(255);

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.KEYCLOAK_ROLE');

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 35, '7:09a43c97e49bc626460480aa1379b522', 'modifyDataType (x5), dropUniqueConstraint, modifyDataType (x3), addUniqueConstraint, dropPrimaryKey, modifyDataType, addNotNullConstraint, addPrimaryKey, modifyDataType (x5), dropUniqueConstraint, modifyDataType, addUniqueConstraint, modifyDataType', '', 'EXECUTED', 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 DBALLO02.REALM ADD LOGIN_WITH_EMAIL_ALLOWED SMALLINT DEFAULT 1 NOT NULL;

ALTER TABLE DBALLO02.REALM ADD DUPLICATE_EMAILS_ALLOWED SMALLINT DEFAULT 0 NOT NULL;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.REALM');

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.REALM');

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 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
INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 37, '7:a161e2ae671a9020fff61e996a207377', 'addUniqueConstraint', '', 'MARK_RAN', NULL, NULL, '3.4.1');

-- Changeset META-INF/jpa-changelog-2.5.1.xml::2.5.1::bburke@redhat.com
ALTER TABLE DBALLO02.FED_USER_CONSENT ADD CREATED_DATE BIGINT;

ALTER TABLE DBALLO02.FED_USER_CONSENT ADD LAST_UPDATED_DATE BIGINT;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_CONSENT');

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.FED_USER_CONSENT');

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 38, '7:37fc1781855ac5388c494f1442b3f717', 'addColumn', '', 'EXECUTED', NULL, NULL, '3.4.1');

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

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

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

-- *********************************************************************
-- Update Database Script
-- *********************************************************************
-- Change Log: META-INF/example-changelog.xml
-- Ran at: 2/1/17 7:55 AM
-- Against: dballo02@jdbc:db2://db-19.rhev-ci-vms.eng.rdu2.redhat.com:50000/cidb
-- Liquibase version: 3.4.1
-- *********************************************************************

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

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

CALL SYSPROC.ADMIN_CMD ('REORG TABLE DBALLO02.EXAMPLE_COMPANY');

INSERT INTO DBALLO02.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', CURRENT TIMESTAMP, 1, '7:4eb040a6f792db674a0fdd7c79db2cc3', 'createTable, addPrimaryKey', '', 'EXECUTED', NULL, NULL, '3.4.1');

