CREATE TABLE macluiz (
  idmacluiz VARCHAR(17) NOT NULL,
  nome VARCHAR(50) NULL,
  ativo BOOL NULL,
  PRIMARY KEY(idmacluiz)
);

CREATE TABLE painelluiz (
  idpainelluiz INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  macluiz_idmacluiz VARCHAR(17) NOT NULL,
  nome VARCHAR(50) NULL,
  ledr INTEGER UNSIGNED NULL,
  ledg INTEGER UNSIGNED NULL,
  ledb INTEGER UNSIGNED NULL,
  linhaum VARCHAR(50) NULL,
  linhadois VARCHAR(50) NULL,
  datainicial DATE NULL,
  datafinal DATE NULL,
  painelluiz_prioridade VARCHAR(50) NULL,
  painelluiz_origem VARCHAR(100) NULL,
  painelluiz_destino VARCHAR(100) NULL,
  PRIMARY KEY(idpainelluiz, macluiz_idmacluiz),
  INDEX painelluiz_FKIndex1(macluiz_idmacluiz)
);
