DROP TRIGGER TTBMODELO_PERFIL00IU;
DROP TABLE TBMODELO_PERFIL;

CREATE TABLE TBPAINEL_PRODUCAO (
    ID INTEGER,
    DESCRICAO VARCHAR(50),
    STATUS INTEGER,
    COLUNAS INTEGER,
    CONFIGURACAO BLOB SUB_TYPE 1 SEGMENT SIZE 80);


CREATE SEQUENCE GTBPAINEL_PRODUCAO;

create trigger ttbpainel_producao_b01i for tbpainel_producao
active before insert position 0
as
begin
  if (new.id is null) then
    new.id = gen_id(gtbpainel_producao,1);
end;

CREATE INDEX TTBPAINEL_PRODUCAO_01
ON TBPAINEL_PRODUCAO (ID);

CREATE INDEX ITBREMESSA_16
ON TBREMESSA (ORIGEM);

