diff --git a/pom.xml b/pom.xml index 10f4118de..7ae2fee66 100644 --- a/pom.xml +++ b/pom.xml @@ -141,7 +141,7 @@ io.ebean ebean-migration - 11.17.1 + 11.18.2 diff --git a/src/main/resources/io/ebeaninternal/dbmigration/builtin-extra-ddl.xml b/src/main/resources/io/ebeaninternal/dbmigration/builtin-extra-ddl.xml index 5a11d4804..8002f6641 100644 --- a/src/main/resources/io/ebeaninternal/dbmigration/builtin-extra-ddl.xml +++ b/src/main/resources/io/ebeaninternal/dbmigration/builtin-extra-ddl.xml @@ -4,15 +4,21 @@ -- Initial script to create stored procedures etc for sqlserver platform -- create table-value-parameters -if not exists (select name from sys.types where name = 'ebean_bigint_tvp') create type ebean_bigint_tvp as table (c1 bigint); -if not exists (select name from sys.types where name = 'ebean_float_tvp') create type ebean_float_tvp as table (c1 float); -if not exists (select name from sys.types where name = 'ebean_bit_tvp') create type ebean_bit_tvp as table (c1 bit); -if not exists (select name from sys.types where name = 'ebean_date_tvp') create type ebean_date_tvp as table (c1 date); -if not exists (select name from sys.types where name = 'ebean_time_tvp') create type ebean_time_tvp as table (c1 time); -if not exists (select name from sys.types where name = 'ebean_uniqueidentifier_tvp') create type ebean_uniqueidentifier_tvp as table (c1 uniqueidentifier); -if not exists (select name from sys.types where name = 'ebean_nvarchar_tvp') create type ebean_nvarchar_tvp as table (c1 nvarchar(max)); +if not exists (select name from sys.types where name = 'ebean_bigint_tvp') create type ebean_bigint_tvp as table (c1 bigint) +GO +if not exists (select name from sys.types where name = 'ebean_float_tvp') create type ebean_float_tvp as table (c1 float) +GO +if not exists (select name from sys.types where name = 'ebean_bit_tvp') create type ebean_bit_tvp as table (c1 bit) +GO +if not exists (select name from sys.types where name = 'ebean_date_tvp') create type ebean_date_tvp as table (c1 date) +GO +if not exists (select name from sys.types where name = 'ebean_time_tvp') create type ebean_time_tvp as table (c1 time) +GO +if not exists (select name from sys.types where name = 'ebean_uniqueidentifier_tvp') create type ebean_uniqueidentifier_tvp as table (c1 uniqueidentifier) +GO +if not exists (select name from sys.types where name = 'ebean_nvarchar_tvp') create type ebean_nvarchar_tvp as table (c1 nvarchar(max)) +GO -delimiter $$ -- -- PROCEDURE: usp_ebean_drop_indices TABLE, COLUMN -- deletes all indices referring to TABLE.COLUMN @@ -38,9 +44,8 @@ BEGIN CLOSE index_cursor; DEALLOCATE index_cursor; END -$$ +GO -delimiter $$ -- -- PROCEDURE: usp_ebean_drop_default_constraint TABLE, COLUMN -- deletes the default constraint, which has a random name @@ -55,9 +60,8 @@ BEGIN if @tmp is not null EXEC('alter table ' + @tableName +' drop constraint ' + @tmp); END -$$ +GO -delimiter $$ -- -- PROCEDURE: usp_ebean_drop_constraints TABLE, COLUMN -- deletes constraints and foreign keys refering to TABLE.COLUMN @@ -89,9 +93,8 @@ BEGIN CLOSE name_cursor; DEALLOCATE name_cursor; END -$$ +GO -delimiter $$ -- -- PROCEDURE: usp_ebean_drop_column TABLE, COLUMN -- deletes the column annd ensures that all indices and constraints are dropped first @@ -107,7 +110,7 @@ BEGIN set @sql = 'alter table ' + @tableName + ' drop column ' + @columnName; EXECUTE(@sql); END -$$ +GO -- Inital script to create stored procedures etc for mysql platform