ALTER TABLE FPA_TIPOINCIDE ADD (
  DSNRTIPOMOVIMENT VARCHAR2(100) DEFAULT NULL NULL, 
  IDREPDSR VARCHAR2(1) DEFAULT 'N' NOT NULL, 
  IDREPDECTERC VARCHAR2(1) DEFAULT 'N' NOT NULL, 
  IDREPFERIAS VARCHAR2(1) DEFAULT 'N' NOT NULL, 
  IDREPAVISO VARCHAR2(1) DEFAULT 'N' NOT NULL 
)
/
ALTER TABLE FPA_TIPOINCIDE ADD CONSTRAINT CKC_IDREPFERIAS_TIPOINCI CHECK (IDREPFERIAS IN ('S','N'))
/
ALTER TABLE FPA_TIPOINCIDE ADD CONSTRAINT CKC_IDREPDECTERC_TIPOINCI CHECK (IDREPDECTERC IN ('S','N'))
/
ALTER TABLE FPA_TIPOINCIDE ADD CONSTRAINT CKC_IDREPAVISO_TIPOINCI CHECK (IDREPAVISO IN ('S','N'))
/
ALTER TABLE FPA_TIPOINCIDE ADD CONSTRAINT CKC_IDREPDSR_TIPOINCI CHECK (IDREPDSR IN ('S','N'))
/
ALTER TABLE INCIDENCIACP ADD (
  DSNRTIPOINCIDE VARCHAR2(100) DEFAULT NULL NULL
)
/
ALTER TABLE INCIDENCIAIRRF ADD (
  DSNRTIPOINCIDE VARCHAR2(100) DEFAULT NULL NULL
)
/
ALTER TABLE INCIDENCIAFGTS ADD (
  DSNRTIPOINCIDE VARCHAR2(100) DEFAULT NULL NULL
)
/
CREATE TABLE INCIDENCIASIND (
  NRINCIDSIND NUMBER(10) NOT NULL, 
  DSINCIDSIND VARCHAR2(200) NOT NULL, 
  CDESOCIAL VARCHAR2(2) DEFAULT NULL NULL, 
  NRORG NUMBER(10) DEFAULT 1 NOT NULL, 
  IDATIVO VARCHAR2(1) DEFAULT 'S' NOT NULL, 
  DTINCLUSAO DATE DEFAULT NULL NULL, 
  DTULTATU DATE DEFAULT NULL NULL, 
  NRORGINCLUSAO NUMBER(10) DEFAULT 1 NULL, 
  NRORGULTATU NUMBER(10) DEFAULT 1 NULL, 
  CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1' NULL, 
  CDOPERULTATU VARCHAR2(12) DEFAULT '1' NULL, 
  DSNRTIPOINCIDE VARCHAR2(100) DEFAULT NULL NULL,
  CONSTRAINT PK_INCIDENCIASIND PRIMARY KEY(NRINCIDSIND)
)
/
ALTER TABLE FPA_EVENTOH ADD CONSTRAINT FK_INCIDENCIASIND FOREIGN KEY (NRINCIDSIND) REFERENCES INCIDENCIASIND (NRINCIDSIND)