CREATE TABLE satelys_menu (id BIGINT AUTO_INCREMENT, titre VARCHAR(255) NOT NULL UNIQUE, texte TEXT NOT NULL, ordre BIGINT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, slug VARCHAR(255), UNIQUE INDEX satelys_menu_sluggable_idx (slug), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE satelys_newsletter (id BIGINT AUTO_INCREMENT, email VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE satelys_sous_menu (id BIGINT AUTO_INCREMENT, menu_id BIGINT NOT NULL, titre VARCHAR(255) NOT NULL, texte TEXT NOT NULL, ordre BIGINT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, slug VARCHAR(255), UNIQUE INDEX satelys_sous_menu_sluggable_idx (slug), INDEX menu_id_idx (menu_id), PRIMARY KEY(id)) ENGINE = INNODB;
ALTER TABLE satelys_sous_menu ADD CONSTRAINT satelys_sous_menu_menu_id_satelys_menu_id FOREIGN KEY (menu_id) REFERENCES satelys_menu(id) ON DELETE CASCADE;
