SET foreign_key_checks = 0;
CREATE TABLE user_to_acl (
  user_id int(11) NOT NULL,
  acl_id int(11) NOT NULL,
  KEY user_to_acl_user_user_id_fk (user_id),
  KEY user_to_acl_acl_acl_id_fk (acl_id),
  CONSTRAINT user_to_acl_acl_acl_id_fk FOREIGN KEY (acl_id) REFERENCES acl (acl_id),
  CONSTRAINT user_to_acl_user_user_id_fk FOREIGN KEY (user_id) REFERENCES user (user_id) ON DELETE CASCADE
) engine = InnoDB;
SET foreign_key_checks = 1;