Bugfixes
parent
e2fcd17b19
commit
074cc6af67
|
|
@ -1,4 +1,4 @@
|
||||||
package db.migrations.org.libreccm.ccm_cms;
|
package db.migrations.org.librecms.ccm_cms;
|
||||||
|
|
||||||
import org.flywaydb.core.api.migration.BaseJavaMigration;
|
import org.flywaydb.core.api.migration.BaseJavaMigration;
|
||||||
import org.flywaydb.core.api.migration.Context;
|
import org.flywaydb.core.api.migration.Context;
|
||||||
|
|
@ -84,7 +84,7 @@ public class V7_0_0_24__add_lifecycle_uuid extends BaseJavaMigration {
|
||||||
private void addDefinitionLifecycleCol(final Connection connection)
|
private void addDefinitionLifecycleCol(final Connection connection)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
try (PreparedStatement stmt = connection.prepareStatement(
|
try (PreparedStatement stmt = connection.prepareStatement(
|
||||||
"alter table LIFECYCLE_DEFINITIONS "
|
"alter table lifecyle_definitions "
|
||||||
+ "add column UUID varchar(255)"
|
+ "add column UUID varchar(255)"
|
||||||
)) {
|
)) {
|
||||||
stmt.execute();
|
stmt.execute();
|
||||||
|
|
@ -110,7 +110,7 @@ public class V7_0_0_24__add_lifecycle_uuid extends BaseJavaMigration {
|
||||||
final Connection connection, final List<Long> definitionIds
|
final Connection connection, final List<Long> definitionIds
|
||||||
) throws Exception {
|
) throws Exception {
|
||||||
try (PreparedStatement stmt = connection.prepareStatement(
|
try (PreparedStatement stmt = connection.prepareStatement(
|
||||||
"update LIFECYCLE_DEFINITIONS set UUID = ? "
|
"update LIFECYLE_DEFINITIONS set UUID = ? "
|
||||||
+ "where LIFECYCLE_DEFINITION_ID = ?"
|
+ "where LIFECYCLE_DEFINITION_ID = ?"
|
||||||
)) {
|
)) {
|
||||||
for (final Long lifecycleId : definitionIds) {
|
for (final Long lifecycleId : definitionIds) {
|
||||||
|
|
@ -139,7 +139,7 @@ public class V7_0_0_24__add_lifecycle_uuid extends BaseJavaMigration {
|
||||||
final Connection connection
|
final Connection connection
|
||||||
) throws Exception {
|
) throws Exception {
|
||||||
try (PreparedStatement stmt = connection.prepareStatement(
|
try (PreparedStatement stmt = connection.prepareStatement(
|
||||||
"alter table LIFECYCLE_DEFINITIONS "
|
"alter table LIFECYLE_DEFINITIONS "
|
||||||
+ "add constraint UK_n6ki3s5im2k2nccpocuctqqe3 "
|
+ "add constraint UK_n6ki3s5im2k2nccpocuctqqe3 "
|
||||||
+ "unique (UUID)"
|
+ "unique (UUID)"
|
||||||
)) {
|
)) {
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package db.migrations.org.librecms.ccm_cms.h2;
|
||||||
|
|
||||||
|
import org.flywaydb.core.api.migration.Context;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
public class V7_0_0_24__add_lifecycle_uuid
|
||||||
|
extends db.migrations.org.librecms.ccm_cms.V7_0_0_24__add_lifecycle_uuid {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void migrate(final Context context) throws Exception {
|
||||||
|
super.migrate(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package db.migrations.org.librecms.ccm_cms.pgsql;
|
||||||
|
|
||||||
|
import org.flywaydb.core.api.migration.Context;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
public class V7_0_0_24__add_lifecycle_uuid
|
||||||
|
extends db.migrations.org.librecms.ccm_cms.V7_0_0_24__add_lifecycle_uuid {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void migrate(final Context context) throws Exception {
|
||||||
|
super.migrate(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
drop schema if exists CCM_CMS;
|
drop schema if exists CCM_CMS CASCADE;
|
||||||
drop schema if exists CCM_CORE;
|
drop schema if exists CCM_CORE CASCADE;
|
||||||
|
|
||||||
drop sequence if exists HIBERNATE_SEQUENCE;
|
drop sequence if exists HIBERNATE_SEQUENCE;
|
||||||
|
|
||||||
|
|
||||||
create schema CCM_CMS;
|
create schema CCM_CMS;
|
||||||
|
|
||||||
create schema CCM_CORE;
|
create schema CCM_CORE;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import javax.transaction.Transactional;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
drop schema if exists CCM_CORE;
|
drop schema if exists CCM_CORE CASCADE;
|
||||||
|
|
||||||
drop sequence if exists HIBERNATE_SEQUENCE;
|
drop sequence if exists HIBERNATE_SEQUENCE;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
DROP SCHEMA IF EXISTS ccm_docrepo;
|
DROP SCHEMA IF EXISTS ccm_docrepo CASCADE;
|
||||||
DROP SCHEMA IF EXISTS ccm_core;
|
DROP SCHEMA IF EXISTS ccm_core CASCADE;
|
||||||
|
|
||||||
DROP SEQUENCE IF EXISTS hibernate_sequence;
|
DROP SEQUENCE IF EXISTS hibernate_sequence;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
DROP SCHEMA IF EXISTS ccm_shortcuts;
|
DROP SCHEMA IF EXISTS ccm_shortcuts CASCADE;
|
||||||
DROP SCHEMA IF EXISTS ccm_core;
|
DROP SCHEMA IF EXISTS ccm_core CASCADE;
|
||||||
|
|
||||||
DROP SEQUENCE IF EXISTS hibernate_sequence;
|
DROP SEQUENCE IF EXISTS hibernate_sequence;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue