From 1d6dea67244a48ac7525a8803cd6e792f1a93a15 Mon Sep 17 00:00:00 2001 From: "thiago.clemente" Date: Mon, 30 Sep 2019 19:30:43 +0000 Subject: [PATCH] fixes bug#15906 dev: qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@97967 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20190930_1205__mantis15906.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/db/migration/V20190930_1205__mantis15906.sql diff --git a/src/db/migration/V20190930_1205__mantis15906.sql b/src/db/migration/V20190930_1205__mantis15906.sql new file mode 100644 index 000000000..17735dd33 --- /dev/null +++ b/src/db/migration/V20190930_1205__mantis15906.sql @@ -0,0 +1,12 @@ +declare +begin + execute immediate 'update cliente_direccion cd set activo=1 where activo is null and exists (select 1 from cliente c where c.cliente_id = cd.cliente_id and c.activo=1)'; + exception when others then null; +end; +/ + +declare +begin + execute immediate 'update cliente_direccion cd set activo=0 where activo is null and exists (select 1 from cliente c where c.cliente_id = cd.cliente_id and c.activo=0)'; + exception when others then null; +end; \ No newline at end of file