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



CREATE TABLE painelfelipe (
  idpainelfelipe INTEGER UNSIGNED  NOT NULL   AUTO_INCREMENT,
  macfelipe_idmacfelipe 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(idpainelfelipe)  ,
INDEX painelfelipe_FKIndex1(macfelipe_idmacfelipe),
  FOREIGN KEY(macfelipe_idmacfelipe)
    REFERENCES macfelipe(idmacfelipe)
      ON DELETE NO ACTION
      ON UPDATE NO ACTION);




