diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/1.0__initial.sql b/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/1.0__initial.sql index 8792984ed..b20611369 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/1.0__initial.sql +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/1.0__initial.sql @@ -185,48 +185,15 @@ alter table migtest_e_history6 add period system_time (sys_period_start,sys_peri -- apply post alter create unique index uq_migtest_e_basic_indextest2 on migtest_e_basic(indextest2) exclude null keys; create unique index uq_migtest_e_basic_indextest6 on migtest_e_basic(indextest6) exclude null keys; -create table migtest_e_history2_history ( - id integer not null, - test_string varchar(255), - obsolete_string1 varchar(255), - obsolete_string2 varchar(255), - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history2_history as (select * from migtest_e_history2) with no data; alter table migtest_e_history2 add versioning use history table migtest_e_history2_history; -create table migtest_e_history3_history ( - id integer not null, - test_string varchar(255), - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history3_history as (select * from migtest_e_history3) with no data; alter table migtest_e_history3 add versioning use history table migtest_e_history3_history; -create table migtest_e_history4_history ( - id integer not null, - test_number integer, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history4_history as (select * from migtest_e_history4) with no data; alter table migtest_e_history4 add versioning use history table migtest_e_history4_history; -create table migtest_e_history5_history ( - id integer not null, - test_number integer, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history5_history as (select * from migtest_e_history5) with no data; alter table migtest_e_history5 add versioning use history table migtest_e_history5_history; -create table migtest_e_history6_history ( - id integer not null, - test_number1 integer, - test_number2 integer not null, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history6_history as (select * from migtest_e_history6) with no data; alter table migtest_e_history6 add versioning use history table migtest_e_history6_history; alter table migtest_e_ref add constraint uq_migtest_e_ref_name unique (name); -- foreign keys and indices diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/1.1.sql b/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/1.1.sql index 100aed067..cbe873d8b 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/1.1.sql +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/1.1.sql @@ -179,13 +179,7 @@ create unique index uq_migtest_e_basic_status_indextest1 on migtest_e_basic(stat create unique index uq_migtest_e_basic_name on migtest_e_basic(name) exclude null keys; create unique index uq_migtest_e_basic_indextest4 on migtest_e_basic(indextest4) exclude null keys; create unique index uq_migtest_e_basic_indextest5 on migtest_e_basic(indextest5) exclude null keys; -create table migtest_e_history_history ( - id integer not null, - test_string bigint, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history_history as (select * from migtest_e_history) with no data; alter table migtest_e_history add versioning use history table migtest_e_history_history; comment on column migtest_e_history.test_string is 'Column altered to long now'; comment on table migtest_e_history is 'We have history now'; diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/idx_db2.migrations b/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/idx_db2.migrations index 7e5fe8d26..c4967d055 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/idx_db2.migrations +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2fori/idx_db2.migrations @@ -1,5 +1,5 @@ -841482576, 1.0__initial.sql -2115993112, 1.1.sql +1907884988, 1.0__initial.sql +-2103050574, 1.1.sql 364066694, 1.2__dropsFor_1.1.sql -144532085, 1.3.sql -1199420632, 1.4__dropsFor_1.3.sql diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/1.0__initial.sql b/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/1.0__initial.sql index dd3910a5a..029e6b2b8 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/1.0__initial.sql +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/1.0__initial.sql @@ -185,48 +185,15 @@ alter table migtest_e_history6 add period system_time (sys_period_start,sys_peri -- apply post alter create unique index uq_mgtst__b_4aybzy on migtest_e_basic(indextest2) exclude null keys; create unique index uq_mgtst__b_4ayc02 on migtest_e_basic(indextest6) exclude null keys; -create table migtest_e_history2_history ( - id integer not null, - test_string varchar(255), - obsolete_string1 varchar(255), - obsolete_string2 varchar(255), - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history2_history as (select * from migtest_e_history2) with no data; alter table migtest_e_history2 add versioning use history table migtest_e_history2_history; -create table migtest_e_history3_history ( - id integer not null, - test_string varchar(255), - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history3_history as (select * from migtest_e_history3) with no data; alter table migtest_e_history3 add versioning use history table migtest_e_history3_history; -create table migtest_e_history4_history ( - id integer not null, - test_number integer, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history4_history as (select * from migtest_e_history4) with no data; alter table migtest_e_history4 add versioning use history table migtest_e_history4_history; -create table migtest_e_history5_history ( - id integer not null, - test_number integer, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history5_history as (select * from migtest_e_history5) with no data; alter table migtest_e_history5 add versioning use history table migtest_e_history5_history; -create table migtest_e_history6_history ( - id integer not null, - test_number1 integer, - test_number2 integer not null, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history6_history as (select * from migtest_e_history6) with no data; alter table migtest_e_history6 add versioning use history table migtest_e_history6_history; alter table migtest_e_ref add constraint uq_mgtst__rf_nm unique (name); -- foreign keys and indices diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/1.1.sql b/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/1.1.sql index 80bfa41b8..f173fb6cc 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/1.1.sql +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/1.1.sql @@ -179,13 +179,7 @@ create unique index uq_mgtst__b_ucfcne on migtest_e_basic(status,indextest1) exc create unique index uq_mgtst__bsc_nm on migtest_e_basic(name) exclude null keys; create unique index uq_mgtst__b_4ayc00 on migtest_e_basic(indextest4) exclude null keys; create unique index uq_mgtst__b_4ayc01 on migtest_e_basic(indextest5) exclude null keys; -create table migtest_e_history_history ( - id integer not null, - test_string bigint, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history_history as (select * from migtest_e_history) with no data; alter table migtest_e_history add versioning use history table migtest_e_history_history; comment on column migtest_e_history.test_string is 'Column altered to long now'; comment on table migtest_e_history is 'We have history now'; diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/idx_db2.migrations b/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/idx_db2.migrations index 7c89c8a49..b45072284 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/idx_db2.migrations +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2legacy/idx_db2.migrations @@ -1,5 +1,5 @@ --1701286706, 1.0__initial.sql --1965264933, 1.1.sql +-1510441716, 1.0__initial.sql +-318724769, 1.1.sql 364066694, 1.2__dropsFor_1.1.sql 1221811961, 1.3.sql -1199420632, 1.4__dropsFor_1.3.sql diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/1.0__initial.sql b/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/1.0__initial.sql index c87758872..8e2a6ff17 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/1.0__initial.sql +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/1.0__initial.sql @@ -185,48 +185,15 @@ alter table migtest_e_history6 add period system_time (sys_period_start,sys_peri -- apply post alter create unique index uq_migtest_e_basic_indextest2 on migtest_e_basic(indextest2) exclude null keys; create unique index uq_migtest_e_basic_indextest6 on migtest_e_basic(indextest6) exclude null keys; -create table migtest_e_history2_history ( - id integer not null, - test_string varchar(255), - obsolete_string1 varchar(255), - obsolete_string2 varchar(255), - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history2_history as (select * from migtest_e_history2) with no data; alter table migtest_e_history2 add versioning use history table migtest_e_history2_history; -create table migtest_e_history3_history ( - id integer not null, - test_string varchar(255), - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history3_history as (select * from migtest_e_history3) with no data; alter table migtest_e_history3 add versioning use history table migtest_e_history3_history; -create table migtest_e_history4_history ( - id integer not null, - test_number integer, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history4_history as (select * from migtest_e_history4) with no data; alter table migtest_e_history4 add versioning use history table migtest_e_history4_history; -create table migtest_e_history5_history ( - id integer not null, - test_number integer, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history5_history as (select * from migtest_e_history5) with no data; alter table migtest_e_history5 add versioning use history table migtest_e_history5_history; -create table migtest_e_history6_history ( - id integer not null, - test_number1 integer, - test_number2 integer not null, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history6_history as (select * from migtest_e_history6) with no data; alter table migtest_e_history6 add versioning use history table migtest_e_history6_history; alter table migtest_e_ref add constraint uq_migtest_e_ref_name unique (name); -- foreign keys and indices diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/1.1.sql b/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/1.1.sql index e8ac4cf36..a3967a721 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/1.1.sql +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/1.1.sql @@ -179,13 +179,7 @@ create unique index uq_migtest_e_basic_status_indextest1 on migtest_e_basic(stat create unique index uq_migtest_e_basic_name on migtest_e_basic(name) exclude null keys; create unique index uq_migtest_e_basic_indextest4 on migtest_e_basic(indextest4) exclude null keys; create unique index uq_migtest_e_basic_indextest5 on migtest_e_basic(indextest5) exclude null keys; -create table migtest_e_history_history ( - id integer not null, - test_string bigint, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history_history as (select * from migtest_e_history) with no data; alter table migtest_e_history add versioning use history table migtest_e_history_history; comment on column migtest_e_history.test_string is 'Column altered to long now'; comment on table migtest_e_history is 'We have history now'; diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/idx_db2.migrations b/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/idx_db2.migrations index 071372b00..396c500c1 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/idx_db2.migrations +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2luw/idx_db2.migrations @@ -1,5 +1,5 @@ --1211384725, 1.0__initial.sql --336858597, 1.1.sql +-1381050106, 1.0__initial.sql +-960600780, 1.1.sql 364066694, 1.2__dropsFor_1.1.sql -688071658, 1.3.sql -1199420632, 1.4__dropsFor_1.3.sql diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/1.0__initial.sql b/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/1.0__initial.sql index c87758872..8e2a6ff17 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/1.0__initial.sql +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/1.0__initial.sql @@ -185,48 +185,15 @@ alter table migtest_e_history6 add period system_time (sys_period_start,sys_peri -- apply post alter create unique index uq_migtest_e_basic_indextest2 on migtest_e_basic(indextest2) exclude null keys; create unique index uq_migtest_e_basic_indextest6 on migtest_e_basic(indextest6) exclude null keys; -create table migtest_e_history2_history ( - id integer not null, - test_string varchar(255), - obsolete_string1 varchar(255), - obsolete_string2 varchar(255), - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history2_history as (select * from migtest_e_history2) with no data; alter table migtest_e_history2 add versioning use history table migtest_e_history2_history; -create table migtest_e_history3_history ( - id integer not null, - test_string varchar(255), - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history3_history as (select * from migtest_e_history3) with no data; alter table migtest_e_history3 add versioning use history table migtest_e_history3_history; -create table migtest_e_history4_history ( - id integer not null, - test_number integer, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history4_history as (select * from migtest_e_history4) with no data; alter table migtest_e_history4 add versioning use history table migtest_e_history4_history; -create table migtest_e_history5_history ( - id integer not null, - test_number integer, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history5_history as (select * from migtest_e_history5) with no data; alter table migtest_e_history5 add versioning use history table migtest_e_history5_history; -create table migtest_e_history6_history ( - id integer not null, - test_number1 integer, - test_number2 integer not null, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history6_history as (select * from migtest_e_history6) with no data; alter table migtest_e_history6 add versioning use history table migtest_e_history6_history; alter table migtest_e_ref add constraint uq_migtest_e_ref_name unique (name); -- foreign keys and indices diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/1.1.sql b/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/1.1.sql index e8ac4cf36..a3967a721 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/1.1.sql +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/1.1.sql @@ -179,13 +179,7 @@ create unique index uq_migtest_e_basic_status_indextest1 on migtest_e_basic(stat create unique index uq_migtest_e_basic_name on migtest_e_basic(name) exclude null keys; create unique index uq_migtest_e_basic_indextest4 on migtest_e_basic(indextest4) exclude null keys; create unique index uq_migtest_e_basic_indextest5 on migtest_e_basic(indextest5) exclude null keys; -create table migtest_e_history_history ( - id integer not null, - test_string bigint, - sys_period_start timestamp(12) not null, - sys_period_end timestamp(12) not null, - sys_period_txn timestamp(12) -); +create table migtest_e_history_history as (select * from migtest_e_history) with no data; alter table migtest_e_history add versioning use history table migtest_e_history_history; comment on column migtest_e_history.test_string is 'Column altered to long now'; comment on table migtest_e_history is 'We have history now'; diff --git a/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/idx_db2.migrations b/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/idx_db2.migrations index 071372b00..396c500c1 100644 --- a/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/idx_db2.migrations +++ b/ebean-test/src/test/resources/migrationtest/dbmigration/db2zos/idx_db2.migrations @@ -1,5 +1,5 @@ --1211384725, 1.0__initial.sql --336858597, 1.1.sql +-1381050106, 1.0__initial.sql +-960600780, 1.1.sql 364066694, 1.2__dropsFor_1.1.sql -688071658, 1.3.sql -1199420632, 1.4__dropsFor_1.3.sql