我正在使用flyway commandline 2.0.3
迁移 db2 LUW 数据库。它适用于保存创建表语句等的各种脚本。但我无法执行创建过程语句。begin-end 块似乎处理错误。
SET CURRENT SCHEMA = DB2INST1;
SET CURRENT PATH = SYSIBM,SYSFUN,SYSPROC,SYSIBMADM,DB2INST1;
CREATE OR REPLACE PROCEDURE ${schema_name_node}.SP_E_H_A_D_V (
IN "@M" VARCHAR(15000),
IN "@S" TIMESTAMP,
IN "@E" TIMESTAMP,
IN "@T" DECIMAL(4, 2) )
SPECIFIC "SP_E_H_A_D_V"
DYNAMIC RESULT SETS 1
LANGUAGE SQL
NOT DETERMINISTIC
NO EXTERNAL ACTION
READS SQL DATA
CALLED ON NULL INPUT
INHERIT SPECIAL REGISTERS
OLD SAVEPOINT LEVEL
BEGIN
DECLARE V_MINUTES INTEGER DEFAULT 0;
...
这是迁移命令的输出:
D:\flyway-commandline-2.0.3-dist\flyway-commandline-2.0.3>flyway.cmd migrate
Flyway (Command-line Tool) v.2.0.3
Current schema version: 1.13.1.201211151200.04.000
Migrating to version 1.13.1.201212101200.04.000
ERROR: com.googlecode.flyway.core.api.FlywayException: Error executing statement
at line 5: CREATE OR REPLACE PROCEDURE JUDITH_NODE.SP_E_H_A_D_V
(
IN "@M" VARCHAR(15000),
IN "@S" TIMESTAMP,
IN "@E" TIMESTAMP,
IN "@T" DECIMAL(4, 2) )
SPECIFIC "SP_E_H_A_D_V"
DYNAMIC RESULT SETS 1
LANGUAGE SQL
NOT DETERMINISTIC
NO EXTERNAL ACTION
READS SQL DATA
CALLED ON NULL INPUT
INHERIT SPECIAL REGISTERS
OLD SAVEPOINT LEVEL
BEGIN
DECLARE V_MINUTES INTEGER DEFAULT 0
ERROR: Caused by com.ibm.db2.jcc.am.ro: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42
601, SQLERRMC=END-OF-STATEMENT;ES INTEGER DEFAULT 0;<psm_semicolon>, DRIVER=3.58
.82
ERROR: FlywayException: Migration to version 1.13.1.201212101200.04.000 failed!
Changes successfully rolled back.
ERROR: Occured in com.googlecode.flyway.core.migration.DbMigrator.applyMigration
() at line 266
hsql
我发现了一个与and类似的问题的问题flyway 1.7
。
有没有办法处理 db2-database 的问题?