/******************************************************************************/
/***               Generated by IBExpert 14/10/2021 14:16:04                ***/
/******************************************************************************/

/******************************************************************************/
/***      Following SET SQL DIALECT is just for the Database Comparer       ***/
/******************************************************************************/
SET SQL DIALECT 3;



/******************************************************************************/
/***                                 Tables                                 ***/
/******************************************************************************/

CREATE GENERATOR PQ_LOGGERAL;

CREATE TABLE LOGGERAL (
    ID            INTEGER NOT NULL,
    FORMULARIO    VARCHAR(50),
    ACAO          VARCHAR(50),
    DATA          DATE,
    HORA          TIME,
    NRDOC         VARCHAR(20),
    IDGERAL       INTEGER,
    NOME          VARCHAR(100),
    IDUSUARIO     INTEGER,
    USUARIO       VARCHAR(50),
    INFORMACOES1  VARCHAR(8000),
    INFORMACOES2  VARCHAR(8000),
    INFORMACOES3  VARCHAR(8000),
    INFORMACOES4  VARCHAR(8000),
    INFORMACOES5  VARCHAR(8000),
    INFORMACOES6  VARCHAR(8000)
);




/******************************************************************************/
/***                              Primary Keys                              ***/
/******************************************************************************/

ALTER TABLE LOGGERAL ADD CONSTRAINT PK_LOGGERAL PRIMARY KEY (ID);


/******************************************************************************/
/***                                Triggers                                ***/
/******************************************************************************/

    
SET TERM ^ ;



/******************************************************************************/
/***                          Triggers for tables                           ***/
/******************************************************************************/



/* Trigger: INSLOGGERAL */
CREATE OR ALTER TRIGGER INSLOGGERAL FOR LOGGERAL
ACTIVE BEFORE INSERT POSITION 0
as 
begin 
   new.ID=gen_id(PQ_LOGGERAL,1);
end
^


SET TERM ; ^



/******************************************************************************/
/***                               Privileges                               ***/
/******************************************************************************/

