/******************************************************************************/
/***               Generated by IBExpert 18/02/2022 11:34:33                ***/
/******************************************************************************/

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



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

CREATE GENERATOR GEN_TRANSFPRODUTOS;

CREATE TABLE TRANSFPRODUTOS (
    ID             INTEGER DEFAULT 0 NOT NULL,
    DATA           DATE,
    HORA           TIME,
    CODPES         INTEGER,
    NOMEPES        VARCHAR(60),
    CONTROLE       VARCHAR(20),
    CANCELADO      SMALLINT DEFAULT 0,
    DATACANCEL     DATE
);




/******************************************************************************/
/***                              Primary keys                              ***/
/******************************************************************************/

ALTER TABLE TRANSFPRODUTOS ADD PRIMARY KEY (ID);


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



SET TERM ^ ;



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



/* Trigger: INSAGENDAMENTOS */
CREATE OR ALTER TRIGGER INSTRANSFPRODUTOS FOR TRANSFPRODUTOS
ACTIVE BEFORE INSERT POSITION 0
AS
begin
   NEW.ID=GEN_ID(GEN_TRANSFPRODUTOS,1);
end
^

SET TERM ; ^



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


