AdmMono/src/db/migration/V20170726_1920__mantis9287.sql

19 lines
601 B
SQL

declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (INDVALIDAESTADO NUMBER(1) DEFAULT 0 NOT NULL)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'UPDATE FISCAL_IMPRESSORA SET INDBLOQUEAECF = 0 WHERE INDBLOQUEAECF IS NULL';
execute immediate 'ALTER TABLE FISCAL_IMPRESSORA MODIFY (INDBLOQUEAECF DEFAULT 0 NOT NULL)';
exception when object_exists then null;
end;