parallel data warehouse - override default script for initialization of flyway metadata table -


i'm working microsoft parallel data warehouse appliance , attempting use flyway handle table migrations in environment. issue i'm running default script establishing schema_version table fails.

here default script far can tell being executed upon calling baseline().

create table [dbo].[dbresult_migration] (     [installed_rank] int not null,     [version] nvarchar(50),     [description] nvarchar(200),     [type] nvarchar(20) not null,     [script] nvarchar(1000) not null,     [checksum] int,     [installed_by] nvarchar(100) not null,     [installed_on] datetime not null default getdate(),     [execution_time] int not null,     [success] bit not null );  alter table [dbo].[dbresult_migration] add constraint [dbresult_migration_pk] primary key ([installed_rank]); create index [dbresult_migration_s_idx] on [dbo].[dbresult_migration] ([success]);  

specifically microsoft parallel data warehouse (ms pdw or aps known) doesn't support expressions default constraints.

msg 104338, level 16, state 1, line 1 expression cannot used default constraint. specify constants default constraint.

which causes error when getdate() used default installed_on column.

the alter table statement fail primary keys , indices managed differently in environment.

is there way override default initialization script schema_version?


update

further investigation reveals next failure occurs when attempting insert records schema_version table. current implementation attempts identify current user based on call dbsupport.getcurrentuserfunction(). sql server function suser_sname(). while function available on both standard sql server , parallel data warehouse current implementation of parallel data warehouse not allow function calls within values portion of insert statement. such, following error returned:

insert values statement can contain constant literal values or variable references. 

when query attempted logged as:

insert [dbo].[dbresult_migration] ([installed_rank],[version],[description],[type],[script],[checksum],[installed_by],[execution_time],[success]) values (@p0, @p1, @p2, @p3, @p4, @p5, suser_sname(), @p6, @p7)      

update 2

i have fork of flyway-core correctly identifies if connecting sql server vs sql server parallel data warehouse. issue have identified sql server pdw not allow ddl within transactions , attempt baseline fails appears attempted within transaction template. evolving question of understanding how modify initialization script need support of new database platform. i've submitted new issue on flyway repo on github here.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -