CREATE TABLE IF NOT EXISTS public.tab_ctb_imp_sped_conta (
  seq_registro INTEGER NOT NULL,
  seq_importacao INTEGER NOT NULL,
  cod_conta_imp VARCHAR(50) NOT NULL,
  des_conta_imp VARCHAR(255) NOT NULL,
  seq_conta_new INTEGER,
  cod_complemento INTEGER,
  ind_tipo_conta CHAR(1),
  CONSTRAINT pk_ctb_imp_sped_conta PRIMARY KEY(seq_registro, seq_importacao),
  CONSTRAINT fk_ctb_imp_sped_conta_a FOREIGN KEY (seq_importacao)
    REFERENCES public.tab_ctb_imp_sped(seq_importacao),
  CONSTRAINT fk_ctb_imp_sped_conta_b FOREIGN KEY (seq_conta_new)
    REFERENCES public.tab_ctb_conta_empresa(seq_conta)
);
UPDATE tab_parametro_sistema SET val_parametro = 22 WHERE cod_parametro = 50005;