CCM NG: Fixed migration scripts

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5739 8810af33-2d31-482b-a856-94f89814c4df
ccm-docs
jensp 2018-11-20 12:25:38 +00:00
parent c969814115
commit cd74dcd0c6
53 changed files with 1536 additions and 176 deletions

View File

@ -18,12 +18,9 @@
*/
package org.librecms.contentsection;
import static org.libreccm.core.CoreConstants.*;
import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;
import org.libreccm.core.CcmObject;
import org.libreccm.l10n.LocalizedString;
import org.libreccm.workflow.Workflow;
@ -44,6 +41,8 @@ import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import static org.librecms.CmsConstants.*;
/**
* The {@code ContentType} entity links a content item with its content section.
* It also provides default values for the lifecycle and the workflow.

View File

@ -0,0 +1,74 @@
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_27__add_party_uuid implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
final PreparedStatement retrieveParties = connection
.prepareStatement("select PARTY_ID from CCM_CORE.PARTIES");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.PARTIES "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement("update CCM_CORE.PARTIES SET uuid = ? "
+ "where PARTY_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.PARTIES "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.PARTIES "
+ "add constraint UK_1hv061qace2mn4loroe3fwdel "
+ "unique (UUID)");
final ResultSet partyIds = retrieveParties.executeQuery();
addUuidCol.execute();
while(partyIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, partyIds.getLong("PARTY_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,73 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_28__add_role_uuid implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
final PreparedStatement retrieveRoles = connection
.prepareStatement("select ROLE_ID from CCM_CORE.CCM_ROLES");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.CCM_ROLES "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement("update CCM_CORE.CCM_ROLES SET uuid = ? "
+ "where ROLE_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.CCM_ROLES "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.CCM_ROLES "
+ "add constraint UK_rfmsjqsq6kagolsod3ufkugll "
+ "unique (UUID)");
final ResultSet roleIds = retrieveRoles.executeQuery();
addUuidCol.execute();
while(roleIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, roleIds.getLong("ROLE_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,73 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_29__add_permission_uuid implements JdbcMigration {
@Override
public void migrate(Connection connection) throws Exception {
final PreparedStatement retrievePermissions = connection
.prepareStatement("select PERMISSION_ID from CCM_CORE.PERMISSIONS");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.PERMISSIONS "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement("update CCM_CORE.PERMISSIONS SET uuid = ? "
+ "where PERMISSION_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.PERMISSIONS "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.PERMISSIONS "
+ "add constraint UK_p50se7rdexv7xnkiqsl6ijyti "
+ "unique (UUID)");
final ResultSet permissionIds = retrievePermissions.executeQuery();
addUuidCol.execute();
while(permissionIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, permissionIds.getLong("PERMISSION_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,75 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_30__add_groupmembership_uuid implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
final PreparedStatement retrieveMemberships = connection
.prepareStatement("select MEMBERSHIP_ID "
+ "from CCM_CORE.GROUP_MEMBERSHIPS");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.GROUP_MEMBERSHIPS "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement("update CCM_CORE.GROUP_MEMBERSHIPS SET uuid = ? "
+ "where MEMBERSHIP_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.GROUP_MEMBERSHIPS "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.GROUP_MEMBERSHIPS "
+ "add constraint UK_kkdoia60bmiwhhdru169p3n9g "
+ "unique (UUID)");
final ResultSet membershipIds = retrieveMemberships.executeQuery();
addUuidCol.execute();
while (membershipIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, membershipIds.getLong("MEMBERSHIP_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,75 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_31__add_rolemembership_uuid implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
final PreparedStatement retrieveMemberships = connection
.prepareStatement("select MEMBERSHIP_ID from CCM_CORE.ROLE_MEMBERSHIPS");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.ROLE_MEMBERSHIPS "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement("update CCM_CORE.ROLE_MEMBERSHIPS SET uuid = ? "
+ "where MEMBERSHIP_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.ROLE_MEMBERSHIPS "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.ROLE_MEMBERSHIPS "
+ "add constraint UK_82wdq214bfs99eii71fp50s97 "
+ "unique (UUID)");
final ResultSet membershipIds = retrieveMemberships.executeQuery();
addUuidCol.execute();
while(membershipIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, membershipIds.getLong("MEMBERSHIP_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,75 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_32__add_domain_ownership_uuid implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
final PreparedStatement retrieveOwnerships = connection
.prepareStatement("select OWNERSHIP_ID from CCM_CORE.DOMAIN_OWNERSHIPS");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.DOMAIN_OWNERSHIPS "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement("update CCM_CORE.DOMAIN_OWNERSHIPS SET uuid = ? "
+ "where OWNERSHIP_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.DOMAIN_OWNERSHIPS "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.DOMAIN_OWNERSHIPS "
+ "add constraint UK_j86gai9740v9hshascbsboudb "
+ "unique (UUID)");
final ResultSet ownershipIds = retrieveOwnerships.executeQuery();
addUuidCol.execute();
while(ownershipIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, ownershipIds.getLong("OWNERSHIP_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,76 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_33__add_categorization_uuid implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
final PreparedStatement retrieveCategoriations = connection
.prepareStatement("select CATEGORIZATION_ID "
+ "from CCM_CORE.CATEGORIZATIONS");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.CATEGORIZATIONS "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement("update CCM_CORE.CATEGORIZATIONS SET uuid = ? "
+ "where CATEGORIZATION_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.CATEGORIZATIONS "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.CATEGORIZATIONS "
+ "add constraint UK_da7jus3wn1tr8poyaw9btxbrc "
+ "unique (UUID)");
final ResultSet categorizationIds = retrieveCategoriations
.executeQuery();
addUuidCol.execute();
while (categorizationIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, categorizationIds.getLong("CATEGORIZATION_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,75 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_34__add_resourcetype_uuid implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
final PreparedStatement retrieveTypes = connection
.prepareStatement("select RESOURCE_TYPE_ID "
+ "from CCM_CORE.RESOURCE_TYPES");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.RESOURCE_TYPES "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement("update CCM_CORE.RESOURCE_TYPES SET uuid = ? "
+ "where RESOURCE_TYPE_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.RESOURCE_TYPES "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.RESOURCE_TYPES "
+ "add constraint UK_ioax2ix2xmq3nw7el5k6orggb "
+ "unique (UUID)");
final ResultSet typeIds = retrieveTypes.executeQuery();
addUuidCol.execute();
while (typeIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, typeIds.getLong("RESOURCE_TYPE_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,77 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_35__add_task_assignment_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
final PreparedStatement retrieveAssignments = connection
.prepareStatement("select TASK_ASSIGNMENT_ID "
+ "from CCM_CORE.WORKFLOW_TASK_ASSIGNMENTS");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.WORKFLOW_TASK_ASSIGNMENTS "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement("update CCM_CORE.WORKFLOW_TASK_ASSIGNMENTS "
+ "SET uuid = ? "
+ "where TASK_ASSIGNMENT_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.WORKFLOW_TASK_ASSIGNMENTS "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.WORKFLOW_TASK_ASSIGNMENTS "
+ "add constraint UK_gv93k167pe9qy3go9vjau1q2t "
+ "unique (UUID)");
final ResultSet assignmentIds = retrieveAssignments.executeQuery();
addUuidCol.execute();
while (assignmentIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, assignmentIds.getLong("TASK_ASSIGNMENT_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,76 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.UUID;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_36__add_task_dependency_uuid implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
final PreparedStatement retrieveDependencies = connection
.prepareStatement("select TASK_DEPENDENCY_ID "
+ "from CCM_CORE.WORKFLOW_TASK_DEPENDENCIES");
final PreparedStatement addUuidCol = connection
.prepareStatement("alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES "
+ "add column UUID varchar(255)");
final PreparedStatement setUuid = connection
.prepareStatement(
"update CCM_CORE.WORKFLOW_TASK_DEPENDENCIES SET uuid = ? "
+ "where TASK_DEPENDENCY_ID = ?");
final PreparedStatement addUuidNotNull = connection
.prepareStatement("alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES "
+ "alter column UUID set not null");
final PreparedStatement addUniqueConstraint = connection
.prepareStatement(
"alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES "
+ "add constraint UK_787va2ep8ucoul29qgsoaxnub "
+ "unique (UUID)");
final ResultSet dependencyIds = retrieveDependencies.executeQuery();
addUuidCol.execute();
while (dependencyIds.next()) {
setUuid.setString(1, UUID.randomUUID().toString());
setUuid.setLong(2, dependencyIds.getLong("TASK_DEPENDENCY_ID"));
setUuid.executeUpdate();
}
addUuidNotNull.execute();
addUniqueConstraint.execute();
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_27__add_party_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_27__add_party_uuid_h2
extends V7_0_0_27__add_party_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_28__add_role_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_28__add_role_uuid_h2
extends V7_0_0_28__add_role_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_29__add_permission_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_29__add_permission_uuid_h2
extends V7_0_0_29__add_permission_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_30__add_groupmembership_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_30__add_groupmembership_uuid_h2
extends V7_0_0_30__add_groupmembership_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_31__add_rolemembership_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_31__add_rolemembership_uuid_h2
extends V7_0_0_31__add_rolemembership_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_32__add_domain_ownership_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_32__add_domain_ownership_uuid_h2
extends V7_0_0_32__add_domain_ownership_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_33__add_categorization_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_33__add_categorization_uuid_h2
extends V7_0_0_33__add_categorization_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_34__add_resourcetype_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_34__add_resourcetype_uuid_h2
extends V7_0_0_34__add_resourcetype_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_35__add_task_assignment_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_35__add_task_assignment_uuid_h2
extends V7_0_0_35__add_task_assignment_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.h2;
import db.migrations.org.libreccm.ccm_core.V7_0_0_36__add_task_dependency_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_36__add_task_dependency_uuid_h2
extends V7_0_0_36__add_task_dependency_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.V7_0_0_27__add_party_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_27__add_party_uuid_pgsql
extends V7_0_0_27__add_party_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,40 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.h2.*;
import db.migrations.org.libreccm.ccm_core.V7_0_0_28__add_role_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_28__add_role_uuid_pgsql
extends V7_0_0_28__add_role_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,40 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.h2.*;
import db.migrations.org.libreccm.ccm_core.V7_0_0_29__add_permission_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_29__add_permission_uuid_pgsql
extends V7_0_0_29__add_permission_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.V7_0_0_30__add_groupmembership_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_30__add_groupmembership_uuid_pgsql
extends V7_0_0_30__add_groupmembership_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.V7_0_0_31__add_rolemembership_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_31__add_rolemembership_uuid_pgsql
extends V7_0_0_31__add_rolemembership_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.V7_0_0_32__add_domain_ownership_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_32__add_domain_ownership_uuid_pgsql
extends V7_0_0_32__add_domain_ownership_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,40 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.h2.*;
import db.migrations.org.libreccm.ccm_core.V7_0_0_33__add_categorization_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_33__add_categorization_uuid_pgsql
extends V7_0_0_33__add_categorization_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,40 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.h2.*;
import db.migrations.org.libreccm.ccm_core.V7_0_0_34__add_resourcetype_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_34__add_resourcetype_uuid_pgsql
extends V7_0_0_34__add_resourcetype_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.V7_0_0_35__add_task_assignment_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_35__add_task_assignment_uuid_pgsql
extends V7_0_0_35__add_task_assignment_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2018 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package db.migrations.org.libreccm.ccm_core.pgsql;
import db.migrations.org.libreccm.ccm_core.V7_0_0_36__add_task_dependency_uuid;
import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class V7_0_0_36__add_task_dependency_uuid_pgsql
extends V7_0_0_36__add_task_dependency_uuid
implements JdbcMigration {
@Override
public void migrate(final Connection connection) throws Exception {
super.migrate(connection);
}
}

View File

@ -26,7 +26,7 @@ import javax.enterprise.context.RequestScoped;
import java.io.Serializable;
/**
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers</a>
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
* @version created on 3/23/17
*/
@RequestScoped

View File

@ -1,5 +0,0 @@
alter table CCM_CORE.PARTIES
add column UUID varchar(255) not null;
alter table CCM_CORE.PARTIES
add constraint UK_1hv061qace2mn4loroe3fwdel unique (UUID);

View File

@ -1,5 +0,0 @@
alter table CCM_CORE.ROLES
add column UUID varchar(255) not null;
alter table CCM_CORE.ROLES
add constraint UK_rfmsjqsq6kagolsod3ufkugll unique (UUID);

View File

@ -1,6 +0,0 @@
alter table CCM_CORE.PERMISSIONS
add column UUID varchar(255) not null;
alter table CCM_CORE.PERMISSIONS
add constraint UK_p50se7rdexv7xnkiqsl6ijyti unique (UUID);

View File

@ -1,7 +0,0 @@
alter table CCM_CORE.GROUP_MEMBERSHIPS
add column UUID varchar(255) not null;
alter table CCM_CORE.GROUP_MEMBERSHIPS
add constraint UK_kkdoia60bmiwhhdru169p3n9g unique (UUID);

View File

@ -1,7 +0,0 @@
alter table CCM_CORE.ROLE_MEMBERSHIPS
add column UUID varchar(255) not null;
alter table CCM_CORE.ROLE_MEMBERSHIPS
add constraint UK_82wdq214bfs99eii71fp50s97 unique (UUID);

View File

@ -1,8 +0,0 @@
alter table CCM_CORE.DOMAIN_OWNERSHIPS
add column UUID varchar(255) not null;
alter table CCM_CORE.DOMAIN_OWNERSHIPS
add constraint UK_j86gai9740v9hshascbsboudb unique (UUID);

View File

@ -1,9 +0,0 @@
alter table CCM_CORE.CATEGORIZATIONS
add column UUID varchar(255) not null;
alter table CCM_CORE.CATEGORIZATIONS
add constraint UK_da7jus3wn1tr8poyaw9btxbrc unique (UUID);

View File

@ -1,10 +0,0 @@
alter table CCM_CORE.RESOURCE_TYPES
add column UUID varchar(255) not null;
alter table CCM_CORE.RESOURCE_TYPES
add constraint UK_ioax2ix2xmq3nw7el5k6orggb unique (UUID);

View File

@ -1,11 +0,0 @@
alter table CCM_CORE.WORKFLOW_TASK_ASSIGNMENTS
add column UUID varchar(255) not null;
alter table CCM_CORE.WORKFLOW_TASK_ASSIGNMENTS
add constraint UK_gv93k167pe9qy3go9vjau1q2t unique (UUID);

View File

@ -1,12 +0,0 @@
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
add column UUID varchar(255) not null;
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
add constraint UK_787va2ep8ucoul29qgsoaxnub unique (UUID);

View File

@ -1,12 +0,0 @@
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
add column UUID varchar(255) not null;
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
add constraint UK_787va2ep8ucoul29qgsoaxnub unique (UUID);

View File

@ -1,5 +0,0 @@
alter table CCM_CORE.PARTIES
add column UUID varchar(255) not null;
alter table CCM_CORE.PARTIES
add constraint UK_1hv061qace2mn4loroe3fwdel unique (UUID);

View File

@ -1,5 +0,0 @@
alter table CCM_CORE.ROLES
add column UUID varchar(255) not null;
alter table CCM_CORE.ROLES
add constraint UK_rfmsjqsq6kagolsod3ufkugll unique (UUID);

View File

@ -1,6 +0,0 @@
alter table CCM_CORE.PERMISSIONS
add column UUID varchar(255) not null;
alter table CCM_CORE.PERMISSIONS
add constraint UK_p50se7rdexv7xnkiqsl6ijyti unique (UUID);

View File

@ -1,7 +0,0 @@
alter table CCM_CORE.GROUP_MEMBERSHIPS
add column UUID varchar(255) not null;
alter table CCM_CORE.GROUP_MEMBERSHIPS
add constraint UK_kkdoia60bmiwhhdru169p3n9g unique (UUID);

View File

@ -1,7 +0,0 @@
alter table CCM_CORE.ROLE_MEMBERSHIPS
add column UUID varchar(255) not null;
alter table CCM_CORE.ROLE_MEMBERSHIPS
add constraint UK_82wdq214bfs99eii71fp50s97 unique (UUID);

View File

@ -1,8 +0,0 @@
alter table CCM_CORE.DOMAIN_OWNERSHIPS
add column UUID varchar(255) not null;
alter table CCM_CORE.DOMAIN_OWNERSHIPS
add constraint UK_j86gai9740v9hshascbsboudb unique (UUID);

View File

@ -1,9 +0,0 @@
alter table CCM_CORE.CATEGORIZATIONS
add column UUID varchar(255) not null;
alter table CCM_CORE.CATEGORIZATIONS
add constraint UK_da7jus3wn1tr8poyaw9btxbrc unique (UUID);

View File

@ -1,10 +0,0 @@
alter table CCM_CORE.RESOURCE_TYPES
add column UUID varchar(255) not null;
alter table CCM_CORE.RESOURCE_TYPES
add constraint UK_ioax2ix2xmq3nw7el5k6orggb unique (UUID);

View File

@ -1,11 +0,0 @@
alter table CCM_CORE.WORKFLOW_TASK_ASSIGNMENTS
add column UUID varchar(255) not null;
alter table CCM_CORE.WORKFLOW_TASK_ASSIGNMENTS
add constraint UK_gv93k167pe9qy3go9vjau1q2t unique (UUID);

View File

@ -1,12 +0,0 @@
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
add column UUID varchar(255) not null;
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
add constraint UK_787va2ep8ucoul29qgsoaxnub unique (UUID);