--  *********************************************************************
--  Update Database Script
--  *********************************************************************
--  Change Log: META-INF/jpa-changelog-master.xml
--  Ran at: 2/1/17 7:55 AM
--  Against: dballo09@jdbc:mysql://db-28.rhev-ci-vms.eng.rdu2.redhat.com:3306/dballo09
--  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 dballo09.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', NOW(), 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 dballo09.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', NOW(), 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 dballo09.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', NOW(), 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 dballo09.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', NOW(), 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 dballo09.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', NOW(), 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 dballo09.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', NOW(), 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 dballo09.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', NOW(), 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 dballo09.RESOURCE_SERVER (ID VARCHAR(36) NOT NULL, CLIENT_ID VARCHAR(36) NOT NULL, ALLOW_RS_REMOTE_MGMT BIT(1) DEFAULT 0 NOT NULL, POLICY_ENFORCE_MODE VARCHAR(15) NOT NULL);

ALTER TABLE dballo09.RESOURCE_SERVER ADD PRIMARY KEY (ID);

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

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

ALTER TABLE dballo09.RESOURCE_SERVER_RESOURCE ADD PRIMARY KEY (ID);

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

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

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

ALTER TABLE dballo09.RESOURCE_SERVER_SCOPE ADD PRIMARY KEY (ID);

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

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

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

ALTER TABLE dballo09.RESOURCE_SERVER_POLICY ADD PRIMARY KEY (ID);

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

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

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

ALTER TABLE dballo09.POLICY_CONFIG ADD PRIMARY KEY (POLICY_ID, NAME);

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

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

ALTER TABLE dballo09.RESOURCE_SCOPE ADD PRIMARY KEY (RESOURCE_ID, SCOPE_ID);

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

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

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

ALTER TABLE dballo09.RESOURCE_POLICY ADD PRIMARY KEY (RESOURCE_ID, POLICY_ID);

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

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

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

ALTER TABLE dballo09.SCOPE_POLICY ADD PRIMARY KEY (SCOPE_ID, POLICY_ID);

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

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

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

ALTER TABLE dballo09.ASSOCIATED_POLICY ADD PRIMARY KEY (POLICY_ID, ASSOCIATED_POLICY_ID);

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

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

INSERT INTO dballo09.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', NOW(), 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 dballo09.RESOURCE_SERVER_POLICY SET TYPE = 'rules' WHERE TYPE = 'drools';

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

CREATE TABLE dballo09.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) NULL, VALUE VARCHAR(2024) NULL);

CREATE TABLE dballo09.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) NULL);

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

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

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

CREATE TABLE dballo09.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) NULL);

CREATE TABLE dballo09.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) NULL);

CREATE TABLE dballo09.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) NULL);

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

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

ALTER TABLE dballo09.BROKER_LINK ADD PRIMARY KEY (IDENTITY_PROVIDER, USER_ID);

ALTER TABLE dballo09.FED_USER_ATTRIBUTE ADD PRIMARY KEY (ID);

ALTER TABLE dballo09.FED_USER_CONSENT ADD PRIMARY KEY (ID);

ALTER TABLE dballo09.FED_USER_CONSENT_ROLE ADD PRIMARY KEY (USER_CONSENT_ID, ROLE_ID);

ALTER TABLE dballo09.FED_USER_CONSENT_PROT_MAPPER ADD PRIMARY KEY (USER_CONSENT_ID, PROTOCOL_MAPPER_ID);

ALTER TABLE dballo09.FED_USER_CREDENTIAL ADD PRIMARY KEY (ID);

ALTER TABLE dballo09.FED_USER_GROUP_MEMBERSHIP ADD PRIMARY KEY (GROUP_ID, USER_ID);

ALTER TABLE dballo09.FED_USER_ROLE_MAPPING ADD PRIMARY KEY (ROLE_ID, USER_ID);

ALTER TABLE dballo09.FED_USER_REQUIRED_ACTION ADD PRIMARY KEY (REQUIRED_ACTION, USER_ID);

ALTER TABLE dballo09.COMPONENT ADD PRIMARY KEY (ID);

ALTER TABLE dballo09.COMPONENT_CONFIG ADD PRIMARY KEY (ID);

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

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

INSERT INTO dballo09.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', NOW(), 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 dballo09.ADMIN_EVENT_ENTITY ADD RESOURCE_TYPE VARCHAR(64) NULL;

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

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

ALTER TABLE dballo09.CREDENTIAL MODIFY VALUE VARCHAR(4000);

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

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

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

ALTER TABLE dballo09.FEDERATED_USER ADD PRIMARY KEY (ID);

ALTER TABLE dballo09.USER_ENTITY ALTER TOTP DROP DEFAULT;

ALTER TABLE dballo09.USER_ENTITY DROP COLUMN TOTP;

ALTER TABLE dballo09.IDENTITY_PROVIDER ADD PROVIDER_DISPLAY_NAME VARCHAR(255) NULL;

ALTER TABLE dballo09.COMPONENT ADD SUB_TYPE VARCHAR(255) NULL;

INSERT INTO dballo09.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('a87d07f9-49a9-480b-84ca-8f8dc00cd350', 'master', 'master', 'rsa', 'rsa', 'org.keycloak.keys.KeyProvider');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4a33767d-1b3f-4027-bcfd-8ca516d9afaf', 'a87d07f9-49a9-480b-84ca-8f8dc00cd350', 'priority', '100');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('42276292-95ac-4f16-b210-a8c5ba5d946b', 'a87d07f9-49a9-480b-84ca-8f8dc00cd350', '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 dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8ba113dc-9b12-496a-b912-c926c2ee4bae', 'a87d07f9-49a9-480b-84ca-8f8dc00cd350', '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 dballo09.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('7ff371d7-2014-4c57-9eb7-7b28a65c8b3a', 'Migration', 'Migration', 'rsa', 'rsa', 'org.keycloak.keys.KeyProvider');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3116ace7-00ff-4d37-8777-1280cb74b283', '7ff371d7-2014-4c57-9eb7-7b28a65c8b3a', 'priority', '100');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('046fbbb2-5e37-4169-9654-e08f673358c9', '7ff371d7-2014-4c57-9eb7-7b28a65c8b3a', '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 dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('da0a4540-1bd1-4db7-98bf-a8ec9ff537cd', '7ff371d7-2014-4c57-9eb7-7b28a65c8b3a', '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 dballo09.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('b35a27de-a5a8-4f1c-b73c-b0a238dd6068', 'Migration2', 'Migration2', 'rsa', 'rsa', 'org.keycloak.keys.KeyProvider');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c5c7e955-9191-4e4e-b5ee-32be16064e70', 'b35a27de-a5a8-4f1c-b73c-b0a238dd6068', 'priority', '100');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('60ad6af7-5e15-4f83-8550-93a46e29fda2', 'b35a27de-a5a8-4f1c-b73c-b0a238dd6068', '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 dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('23a46e53-aed4-41c9-963e-fe428006aa60', 'b35a27de-a5a8-4f1c-b73c-b0a238dd6068', '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 dballo09.REALM DROP COLUMN CODE_SECRET;

ALTER TABLE dballo09.REALM DROP COLUMN PRIVATE_KEY;

ALTER TABLE dballo09.REALM DROP COLUMN PUBLIC_KEY;

ALTER TABLE dballo09.REALM DROP COLUMN CERTIFICATE;

ALTER TABLE dballo09.USER_CONSENT ADD CREATED_DATE BIGINT NULL, ADD LAST_UPDATED_DATE BIGINT NULL;

INSERT INTO dballo09.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', NOW(), 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 dballo09.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 dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('cc91ccc2-4996-4b70-b761-2c4f1036936c', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'priority', '2');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('5ac21029-a21a-459c-982e-4c8584582673', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'fullSyncPeriod', '-1');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('24d4f3dd-b7d6-4c58-bff7-67c95d1985d4', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'changedSyncPeriod', '-1');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d6cca2f1-aede-4cde-880e-7a5dc2886cfa', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'lastSync', '0');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('fecc8235-1697-45e9-8207-aa6cee24f555', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'allowKerberosAuthentication', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('92a7465d-a870-4697-8663-ce91c542c0bb', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'authType', 'none');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('309e9154-7858-4df9-83f3-54d2915e8d88', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'batchSizeForSync', '1001');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('cbf12b52-2812-4f99-9b1e-0253596c099c', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionPooling', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('1df5c848-ef9e-4586-a54d-1bffe6ae9843', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionUrl', 'http://localhost');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b18b5f82-6e61-4742-ab5a-8e66aed472ca', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'debug', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a6204a01-1fc4-40ec-b32e-61feae184389', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'editMode', 'READ_ONLY');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('cee5582f-a25a-4bae-af13-13d3163d06a4', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'kerberosRealm', 'realm');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('36395e74-47e5-4a15-80f1-79bb1dcf9e92', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'keyTab', 'keytab');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('842fc22c-d35b-4628-8da7-3fe94b9bf9b6', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'pagination', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8aa1ec03-bf17-4720-bca5-560a2d265792', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'rdnLDAPAttribute', 'uid');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('21f1d895-1949-422b-a061-cbc787b1b295', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'searchScope', '1');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a570ddf9-e2a8-4d89-b92e-74f18e3f011d', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'serverPrincipal', 'principal');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f4d6db17-e1c9-42b3-869d-8d3d21ff4c8a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'syncRegistrations', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('20d2aabf-ba53-4eb9-a5dc-3bb4e275ecf6', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useKerberosForPasswordAuthentication', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ae99add2-7429-4586-b77c-22a5fbe5e92a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userAccountControlsAfterPasswordUpdate', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8f393a41-2a39-4d92-bff7-da357cc3a779', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usernameLDAPAttribute', 'uid');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('7f62ddd6-f5e5-4297-8fa2-28137026afa2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userObjectClasses', 'inetOrgPerson, organizationalPerson');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('938d87ba-f808-4d35-84b5-b856fbefe316', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usersDn', 'dn');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d488b28d-59b8-4793-8382-781740570748', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useTruststoreSpi', 'ldapsOnly');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f81ae1f5-8f55-49a5-863e-5057c7512856', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'uuidLDAPAttribute', 'nsuniqueid');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4e8b0f62-35dc-4934-abfc-fc7db3979487', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'vendor', 'rhds');

INSERT INTO dballo09.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('05349c3f-e615-4dd1-b730-b6439432d758', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'first name', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f12c8cad-1af7-4d9d-8bb2-d7932c0571ef', '05349c3f-e615-4dd1-b730-b6439432d758', 'always.read.value.from.ldap', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('42841f0d-6e48-4d8f-a302-76e13dfe9187', '05349c3f-e615-4dd1-b730-b6439432d758', 'is.mandatory.in.ldap', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('31e316d3-5038-45ae-9731-16d09f6f797f', '05349c3f-e615-4dd1-b730-b6439432d758', 'ldap.attribute', 'cn');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('922641ef-fb71-4d83-b058-cff837712710', '05349c3f-e615-4dd1-b730-b6439432d758', 'read.only', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('79d89624-a1f6-4b78-a34a-3157f8e35583', '05349c3f-e615-4dd1-b730-b6439432d758', 'user.model.attribute', 'firstName');

DELETE FROM dballo09.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='05349c3f-e615-4dd1-b730-b6439432d758';

DELETE FROM dballo09.USER_FEDERATION_MAPPER WHERE ID='05349c3f-e615-4dd1-b730-b6439432d758';

INSERT INTO dballo09.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('0878c1dc-1395-42c7-9ea8-837b169c2860', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'last name', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('1c711e79-76e4-48ca-a832-a8d62ea00719', '0878c1dc-1395-42c7-9ea8-837b169c2860', 'always.read.value.from.ldap', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('12906f4d-c67f-46cd-8721-134f73efc633', '0878c1dc-1395-42c7-9ea8-837b169c2860', 'is.mandatory.in.ldap', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('583549d4-a19f-451c-9169-c6c0d0507968', '0878c1dc-1395-42c7-9ea8-837b169c2860', 'ldap.attribute', 'sn');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('03ce4a56-d6d8-4d07-aa00-f4461d58a29e', '0878c1dc-1395-42c7-9ea8-837b169c2860', 'read.only', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d4f93f81-7db6-483f-8403-ce4c47cfb02f', '0878c1dc-1395-42c7-9ea8-837b169c2860', 'user.model.attribute', 'lastName');

DELETE FROM dballo09.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='0878c1dc-1395-42c7-9ea8-837b169c2860';

DELETE FROM dballo09.USER_FEDERATION_MAPPER WHERE ID='0878c1dc-1395-42c7-9ea8-837b169c2860';

INSERT INTO dballo09.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('4bd1d0d8-3246-4d71-9d0d-113cd6548f9d', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'username', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4f0e8433-3770-4ca7-9493-5af9be0eb5d9', '4bd1d0d8-3246-4d71-9d0d-113cd6548f9d', 'always.read.value.from.ldap', 'false');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('6bac6487-d38a-4af4-ab6e-7aea974c9fe4', '4bd1d0d8-3246-4d71-9d0d-113cd6548f9d', 'is.mandatory.in.ldap', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d6c6c271-edfe-41d6-8595-8fc2e346e4f2', '4bd1d0d8-3246-4d71-9d0d-113cd6548f9d', 'ldap.attribute', 'uid');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('43afa1d6-197a-4d20-9ace-75fa5549bbd6', '4bd1d0d8-3246-4d71-9d0d-113cd6548f9d', 'read.only', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d0dc6337-a583-4498-99de-e01452236200', '4bd1d0d8-3246-4d71-9d0d-113cd6548f9d', 'user.model.attribute', 'username');

DELETE FROM dballo09.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='4bd1d0d8-3246-4d71-9d0d-113cd6548f9d';

DELETE FROM dballo09.USER_FEDERATION_MAPPER WHERE ID='4bd1d0d8-3246-4d71-9d0d-113cd6548f9d';

INSERT INTO dballo09.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('7f8e66c5-bec1-4686-aa43-ca969864a146', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'creation date', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('38a28a6e-53f5-433c-9856-f776ab1c7012', '7f8e66c5-bec1-4686-aa43-ca969864a146', 'always.read.value.from.ldap', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c0b83452-6545-4188-a624-d99c465c8d48', '7f8e66c5-bec1-4686-aa43-ca969864a146', 'is.mandatory.in.ldap', 'false');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3603001e-4eb0-4753-b06a-f53ade0aeb35', '7f8e66c5-bec1-4686-aa43-ca969864a146', 'ldap.attribute', 'createTimestamp');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('dec9ea57-46b4-43b7-80e2-7527ac3e3957', '7f8e66c5-bec1-4686-aa43-ca969864a146', 'read.only', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ac947108-48f6-410a-8699-10b41bfea331', '7f8e66c5-bec1-4686-aa43-ca969864a146', 'user.model.attribute', 'createTimestamp');

DELETE FROM dballo09.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='7f8e66c5-bec1-4686-aa43-ca969864a146';

DELETE FROM dballo09.USER_FEDERATION_MAPPER WHERE ID='7f8e66c5-bec1-4686-aa43-ca969864a146';

INSERT INTO dballo09.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('b0bb36ea-3566-4db6-80fc-194d0c8454dd', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'modify date', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f0447154-ce18-4e11-b023-2eb20aaf36dd', 'b0bb36ea-3566-4db6-80fc-194d0c8454dd', 'always.read.value.from.ldap', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ae71dbe1-54ed-4480-8b2f-31cc03f8070b', 'b0bb36ea-3566-4db6-80fc-194d0c8454dd', 'is.mandatory.in.ldap', 'false');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4c8b3336-b71f-455f-acd2-5b50041ca7df', 'b0bb36ea-3566-4db6-80fc-194d0c8454dd', 'ldap.attribute', 'modifyTimestamp');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e6a3842f-6bc4-416f-ae14-b48bfb48e5a8', 'b0bb36ea-3566-4db6-80fc-194d0c8454dd', 'read.only', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4d4a066a-c5e0-4d58-9a58-5209d3b2aa49', 'b0bb36ea-3566-4db6-80fc-194d0c8454dd', 'user.model.attribute', 'modifyTimestamp');

DELETE FROM dballo09.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='b0bb36ea-3566-4db6-80fc-194d0c8454dd';

DELETE FROM dballo09.USER_FEDERATION_MAPPER WHERE ID='b0bb36ea-3566-4db6-80fc-194d0c8454dd';

INSERT INTO dballo09.COMPONENT (ID, REALM_ID, PARENT_ID, NAME, PROVIDER_ID, PROVIDER_TYPE) VALUES ('b57460e1-4047-45db-9ecf-d05e7040501a', 'Migration2', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'email', 'user-attribute-ldap-mapper', 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('9c8b0f9c-4f7c-4a70-8506-39e0e3e773c6', 'b57460e1-4047-45db-9ecf-d05e7040501a', 'always.read.value.from.ldap', 'false');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('23e100ef-9c04-4ab7-8fce-49d5808098d7', 'b57460e1-4047-45db-9ecf-d05e7040501a', 'is.mandatory.in.ldap', 'false');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('1e5a59d1-aefb-4536-91b8-07bd051cba3a', 'b57460e1-4047-45db-9ecf-d05e7040501a', 'ldap.attribute', 'mail');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('047ce941-e510-40a4-b409-ba58738af3b1', 'b57460e1-4047-45db-9ecf-d05e7040501a', 'read.only', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3bf9ce2f-fd10-40bf-9671-2e392cb72311', 'b57460e1-4047-45db-9ecf-d05e7040501a', 'user.model.attribute', 'email');

DELETE FROM dballo09.USER_FEDERATION_MAPPER_CONFIG WHERE USER_FEDERATION_MAPPER_ID='b57460e1-4047-45db-9ecf-d05e7040501a';

DELETE FROM dballo09.USER_FEDERATION_MAPPER WHERE ID='b57460e1-4047-45db-9ecf-d05e7040501a';

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

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

INSERT INTO dballo09.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', NOW(), 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 dballo09.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 dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8e4abd0c-3b34-4b90-9e44-2e04a15190f7', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'priority', '2');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('da54ef22-88c2-484b-bea2-09b2da987505', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'fullSyncPeriod', '-1');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('972e5f83-a464-4fca-b267-67744b30d360', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'changedSyncPeriod', '-1');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4838ade1-5347-480e-b8f4-6d6dbef44a86', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'lastSync', '0');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d1532e88-2e5d-4872-be6f-a789cee77be9', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'allowKerberosAuthentication', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('24bb3ea8-dd3e-4e1e-ab94-71e8a111153b', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'authType', 'none');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('b3282abb-b156-402e-a495-bfbfbf91f97f', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'batchSizeForSync', '1001');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('f1de0428-241e-43f5-b625-fba059420750', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionPooling', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('23e26a6c-bb5c-4f37-a3ec-ae165af63938', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'connectionUrl', 'http://localhost');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d03fc428-4c78-454f-8eb1-68a6c1bd7afd', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'debug', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('dc25de59-e237-42e5-a931-38e42e254140', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'editMode', 'READ_ONLY');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('181abd60-6a95-4cac-acc1-35e55b58a729', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'kerberosRealm', 'realm');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e5208ab7-ce97-497a-a1da-76436b6c3e4a', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'keyTab', 'keytab');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('89f504b8-5af4-4924-ada1-b302b319189d', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'pagination', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('ab60ec13-8735-4f39-a408-0f9e8fc47af5', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'rdnLDAPAttribute', 'uid');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('8acbf5a6-73be-47b2-972c-b97f197d1d92', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'searchScope', '1');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('c6030fbb-34bf-4829-88d8-d5ba328dd3aa', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'serverPrincipal', 'principal');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3eca17d8-0541-4039-b236-fdedbdc465d3', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'syncRegistrations', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4196d129-7a68-4743-aab8-5e54435f32cd', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useKerberosForPasswordAuthentication', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('1f277951-31b6-4f86-88a4-d968fb6364ff', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userAccountControlsAfterPasswordUpdate', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3cd5dcdb-57b8-40f7-8c3d-fb8bca6d4e14', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usernameLDAPAttribute', 'uid');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('948549b7-8532-4d82-b136-4dd88827d12b', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'userObjectClasses', 'inetOrgPerson, organizationalPerson');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('4182cbff-6ac6-47ba-9b27-4918d9a44809', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'usersDn', 'dn');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('10ea1f64-8852-4371-9ff0-768302e45c26', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'useTruststoreSpi', 'ldapsOnly');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('0df5962c-8409-4865-88f4-0b59748f3432', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'uuidLDAPAttribute', 'nsuniqueid');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('dc88441d-fd86-4ee8-bbb2-3a08d5ab8393', '4dd39136-ae1f-4cb7-b769-ce97e1865aa6', 'vendor', 'rhds');

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

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

INSERT INTO dballo09.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 dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a75c45d4-90ee-4e10-8414-fbab68c2870f', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'priority', '3');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('de4f2c0c-7c9e-4860-81c6-88595f8a8467', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'fullSyncPeriod', '0');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('fda4852f-80d9-41d8-9563-b5550ef2fb77', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'changedSyncPeriod', '0');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('3c35f798-c887-4323-b23a-5663331026f6', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'lastSync', '0');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('12f505f8-765d-4056-8b8a-82a27b405fa8', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'allowKerberosAuthentication', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('d1a2e28c-5680-49e0-8c45-340a4f649ef1', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'allowPasswordAuthentication', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e9334cbf-f520-477e-a336-48c61fb1b072', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'debug', 'true');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('45236a17-3abb-4730-9811-c24e8a5a370e', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'editMode', 'READ_ONLY');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('a6b45157-356d-4599-bc27-a29b2d85f0a0', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'kerberosRealm', 'realm');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('2be110af-37a1-4b80-9433-59676b13e799', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'keyTab', 'keytab');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e3d350db-8006-4cb6-886a-fb838805cc18', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'serverPrincipal', 'principal');

INSERT INTO dballo09.COMPONENT_CONFIG (ID, COMPONENT_ID, NAME, VALUE) VALUES ('e45e5c47-4c47-4dcc-827a-aff09df2c972', '03b669fa-f86f-42fb-b4a4-88315b3ebeb6', 'updateProfileFirstLogin', 'true');

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

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

ALTER TABLE dballo09.OFFLINE_USER_SESSION MODIFY USER_ID VARCHAR(255);

INSERT INTO dballo09.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', NOW(), 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 dballo09.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', NOW(), 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 dballo09.AUTHENTICATION_FLOW MODIFY DESCRIPTION NVARCHAR(255);

ALTER TABLE dballo09.CLIENT_TEMPLATE MODIFY DESCRIPTION NVARCHAR(255);

ALTER TABLE dballo09.RESOURCE_SERVER_POLICY MODIFY DESCRIPTION NVARCHAR(255);

ALTER TABLE dballo09.CLIENT MODIFY DESCRIPTION NVARCHAR(255);

ALTER TABLE dballo09.CLIENT MODIFY NAME NVARCHAR(255);

ALTER TABLE dballo09.USER_ENTITY DROP KEY UK_RU8TT6T700S9V50BU18WS5HA6;

ALTER TABLE dballo09.USER_ENTITY MODIFY FIRST_NAME NVARCHAR(255);

ALTER TABLE dballo09.USER_ENTITY MODIFY LAST_NAME NVARCHAR(255);

ALTER TABLE dballo09.USER_ENTITY MODIFY USERNAME NVARCHAR(255);

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

ALTER TABLE dballo09.USERNAME_LOGIN_FAILURE DROP PRIMARY KEY;

ALTER TABLE dballo09.USERNAME_LOGIN_FAILURE MODIFY USERNAME NVARCHAR(255);

ALTER TABLE dballo09.USERNAME_LOGIN_FAILURE MODIFY USERNAME NVARCHAR(255) NOT NULL;

ALTER TABLE dballo09.USERNAME_LOGIN_FAILURE ADD PRIMARY KEY (REALM_ID, USERNAME);

ALTER TABLE dballo09.KEYCLOAK_GROUP MODIFY NAME NVARCHAR(255);

ALTER TABLE dballo09.USER_ATTRIBUTE MODIFY VALUE NVARCHAR(255);

ALTER TABLE dballo09.GROUP_ATTRIBUTE MODIFY VALUE NVARCHAR(255);

ALTER TABLE dballo09.REALM_ATTRIBUTE MODIFY VALUE NVARCHAR(255);

ALTER TABLE dballo09.COMPONENT_CONFIG MODIFY VALUE NVARCHAR(4000);

ALTER TABLE dballo09.KEYCLOAK_ROLE DROP KEY `UK_J3RWUVD56ONTGSUHOGM184WW2-2`;

ALTER TABLE dballo09.KEYCLOAK_ROLE MODIFY NAME NVARCHAR(255);

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

ALTER TABLE dballo09.KEYCLOAK_ROLE MODIFY DESCRIPTION NVARCHAR(255);

INSERT INTO dballo09.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', NOW(), 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 dballo09.REALM ADD LOGIN_WITH_EMAIL_ALLOWED BIT(1) NOT NULL DEFAULT 1, ADD DUPLICATE_EMAILS_ALLOWED BIT(1) NOT NULL DEFAULT 0;

INSERT INTO dballo09.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', NOW(), 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 dballo09.KEYCLOAK_GROUP ADD CONSTRAINT SIBLING_NAMES UNIQUE (REALM_ID, PARENT_GROUP, NAME);

INSERT INTO dballo09.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', NOW(), 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 dballo09.FED_USER_CONSENT ADD CREATED_DATE BIGINT NULL, ADD LAST_UPDATED_DATE BIGINT NULL;

INSERT INTO dballo09.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', NOW(), 38, '7:37fc1781855ac5388c494f1442b3f717', 'addColumn', '', 'EXECUTED', NULL, NULL, '3.4.1');

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

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

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

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

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

ALTER TABLE dballo09.EXAMPLE_COMPANY ADD PRIMARY KEY (ID);

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

