/******************************************************************************/
/***               Generated by IBExpert 16/11/2023 08:55:51                ***/
/******************************************************************************/

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



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

CREATE GENERATOR PQ_CADCARACTERISTICASITENS;


CREATE TABLE CADCARACTERISTICASITENS (
    ID             INTEGER NOT NULL,
    IDITEMTRAY     INTEGER,
    ITEM           VARCHAR(100),
    IDCARACT       INTEGER,
    CONTROLEITEM   VARCHAR(30),
    CONTROLE       VARCHAR(30)
);




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

ALTER TABLE CADCARACTERISTICASITENS ADD CONSTRAINT PK_CADCARACTERISTICASITENS PRIMARY KEY (ID);


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


SET TERM ^ ;



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



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


SET TERM ; ^



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






