as failed migrations ( stmt executions), flyway needs provide feedback , like, # of rows updated/inserted/deleted
successful stmt executions verification developers. developers check dmls executed wanted.
flyway provide way returning result set 'select' queries , 'dbms_output' procedure output.
-- flywaytest db running on 10.2.3.42 host oracle 11g -- sample user create test table.
create table employees ( int, name varchar2(10), instime date);
-- sample file has 1 create stmt, 3 insert stmts, 2 update stmts , 1 delete stmts
insert employees values (1, 'test1', sysdate); insert employees values (2, 'test2', sysdate); insert employees values (3, 'test3', sysdate); commit; update employees set i=4 name='test3'; update employees set 1=5 name='test1'; commit; delete employees i=2; commit;
-- using command line option oracle 11g --flyway conf file. flywaytest db running on 10.2.3.42.
admin$ cat conf/flyway.conf flyway.url=jdbc:oracle:thin:@//10.2.3.42:1800/flywaytest flyway.user=sample flyway.password=ampletest flyway.sqlmigrationprefix=1215 flyway.sqlmigrationsuffix=.sql
-- flyway baseline w/ default version , discription admin$ ./flyway baseline
admin$ ./flyway -x migrate
<<< debug mode output wont show # rows inserted / updated / deleted. >>>
flyway doesn't show # rows inserted/updated/deleted have commit in between.
axel says, "flyway logs update count @ least 1 row affected". got update count ? pls post
Comments
Post a Comment