fixes bug#AL-1536 qua: dev:Lucas
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@115121 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
0fafa202ae
commit
e1b4852ff0
|
@ -6,6 +6,14 @@ begin
|
|||
exception when column_exists then null;
|
||||
end;
|
||||
/
|
||||
declare
|
||||
column_exists exception;
|
||||
pragma exception_init (column_exists , -01430);
|
||||
begin
|
||||
execute immediate 'ALTER TABLE BPE ADD (NUMDAV VARCHAR2(15) )';
|
||||
exception when column_exists then null;
|
||||
end;
|
||||
/
|
||||
declare
|
||||
column_exists exception;
|
||||
pragma exception_init (column_exists , -01430);
|
||||
|
@ -39,7 +47,7 @@ BEGIN
|
|||
FOR EMP IN (SELECT EMPRESA_ID FROM EMPRESA WHERE ACTIVO = 1 AND EMPRESA_ID > 0)
|
||||
LOOP
|
||||
BEGIN
|
||||
SELECT SEQUENCE_NAME INTO nomSeq from DBA_SEQUENCES where SEQUENCE_owner = (select user from dual) AND SEQUENCE_NAME like 'FOLIO_SISTEMA_DAV_' || EMP.EMPRESA_ID || '_SEQ%';
|
||||
SELECT SEQUENCE_NAME INTO nomSeq from user_SEQUENCES where SEQUENCE_NAME like 'FOLIO_SISTEMA_DAV_' || EMP.EMPRESA_ID || '_SEQ%';
|
||||
EXCEPTION WHEN NO_DATA_FOUND THEN
|
||||
EXECUTE IMMEDIATE 'CREATE SEQUENCE ' || 'FOLIO_SISTEMA_DAV_' || EMP.EMPRESA_ID || '_SEQ MINVALUE 1 MAXVALUE 999999999 INCREMENT BY 1 START WITH 1 ORDER NOCACHE CYCLE';
|
||||
END;
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
declare
|
||||
column_exists exception;
|
||||
pragma exception_init (column_exists , -01430);
|
||||
begin
|
||||
execute immediate 'ALTER TABLE BPE ADD (NUMDAV VARCHAR2(15) )';
|
||||
exception when column_exists then null;
|
||||
end;
|
Loading…
Reference in New Issue