#1292 - Fix for non-native / number boolean types (MySql, SqlServer, Oracle, Sqlite, SqlAnywhere) removing "default 0" + Fix for DB2 add foreign key update clause

This commit is contained in:
Roland Praml authored and Rob Bygrave committed 2018-02-27 11:58:10 +13:00
1 parent a569c7fc96
commit 3dfdd0e2e8
32 files changed
+135 -122

No files matched your search

@@ -27,14 +27,14 @@ alter table migtest_e_basic modify some_date datetime(6) not null;
insert into migtest_e_user (id) select distinct user_id from migtest_e_basic;
alter table migtest_e_basic add constraint fk_migtest_e_basic_user_id foreign key (user_id) references migtest_e_user (id) on delete restrict on update restrict;
alter table migtest_e_basic modify user_id integer;
alter table migtest_e_basic add column new_string_field varchar(255) not null default 'foo''bar';
alter table migtest_e_basic add column new_boolean_field tinyint(1) default 0 not null;
alter table migtest_e_basic add column new_string_field varchar(255) default 'foo''bar' not null;
alter table migtest_e_basic add column new_boolean_field tinyint(1) default 1 not null;
update migtest_e_basic set new_boolean_field = old_boolean;
alter table migtest_e_basic add column new_boolean_field2 tinyint(1) default 0 not null;
alter table migtest_e_basic add column progress integer not null default 0;
alter table migtest_e_basic add column new_boolean_field2 tinyint(1) default 1 not null;
alter table migtest_e_basic add column progress integer default 0 not null;
alter table migtest_e_basic add constraint ck_migtest_e_basic_progress check ( progress in (0,1,2));
alter table migtest_e_basic add column new_integer integer not null default 42;
alter table migtest_e_basic add column new_integer integer default 42 not null;
alter table migtest_e_basic drop index uq_migtest_e_basic_indextest2;
alter table migtest_e_basic drop index uq_migtest_e_basic_indextest6;
@@ -48,7 +48,7 @@ update migtest_e_history2 set test_string = 'unknown' where test_string is null;
alter table migtest_e_history2 alter test_string set default 'unknown';
alter table migtest_e_history2 modify test_string varchar(255) not null;
alter table migtest_e_history2 add column test_string2 varchar(255);
alter table migtest_e_history2 add column test_string3 varchar(255) not null default 'unknown';
alter table migtest_e_history2 add column test_string3 varchar(255) default 'unknown' not null;
alter table migtest_e_history2_history add column test_string2 varchar(255);
alter table migtest_e_history2_history add column test_string3 varchar(255);