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

CREATE TABLE painelceci (
  idpainelceci INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  macceci_idmacceci 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,
  PRIMARY KEY(idpainelceci),
  INDEX painelceci_FKIndex1(macceci_idmacceci),
  FOREIGN KEY(macceci_idmacceci)
    REFERENCES macceci(idmacceci)
      ON DELETE NO ACTION
      ON UPDATE NO ACTION
);


