lucas.taia 2017-07-20 23:54:35 +00:00
parent 654b3a2cad
commit 0b03075dae
1 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,47 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE "FISCAL_IMPRESSORA_ESTADO"
(
"FISCALIMPESTADO_ID" NUMBER(15,0) NOT NULL ENABLE,
"FISCALIMPRESSORA_ID" NUMBER(7,0) NOT NULL ENABLE,
"ESTADO_ID" NUMBER(7,0) NOT NULL ENABLE,
"ACTIVO" NUMBER(1,0),
"FECMODIF" DATE,
"USUARIO_ID" NUMBER(7,0),
CONSTRAINT "FISCAL_IMPRESSORA_ESTADO_PK" PRIMARY KEY ("FISCALIMPESTADO_ID")
)';
execute immediate
'CREATE SEQUENCE FISCAL_IMPRESSORA_ESTADO_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (ESTADOLACRE_ID NUMBER(7) )';
exception when object_exists then null;
end;
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (EMPRESA_ID NUMBER(7) )';
exception when object_exists then null;
end;
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (INDBLOQUEAECF NUMBER(7) )';
exception when object_exists then null;
end;