-- migrate:up
CREATE TABLE role_menu_permissions (
    id INT AUTO_INCREMENT PRIMARY KEY,
    user_groups_id INT NOT NULL,
    menu_item_id INT NOT NULL,
    FOREIGN KEY (user_groups_id) REFERENCES user_groups(id) ON DELETE CASCADE,
    FOREIGN KEY (menu_item_id) REFERENCES menu_items(id) ON DELETE CASCADE,
    UNIQUE (user_groups_id, menu_item_id) 
);

-- migrate:down
DROP TABLE IF EXISTS role_menu_permissions;
