title: errno: 150 "Foreign key constraint is incorrectly formed" in my database
body: <pre><code>CREATE  TABLE IF NOT EXISTS `shop_1`.`user` (
    `id` INT NOT NULL AUTO_INCREMENT ,
    `email` VARCHAR(45) NOT NULL ,
    `password` VARCHAR(45) NOT NULL ,
    `phone` VARCHAR(45) NOT NULL ,
    `role` VARCHAR(45) NOT NULL ,
    PRIMARY KEY (`id`) ,
    UNIQUE INDEX `email_UNIQUE` (`email` ASC) )
  ENGINE = InnoDB;
  </code></pre>
  <hr />
  <pre><code>CREATE  TABLE IF NOT EXISTS `shop_1`.`address` (
    `id` INT NOT NULL AUTO_INCREMENT ,
    `user_id` INT NOT NULL ,
    `title_en` VARCHAR(45) NOT NULL ,
    `title_ar` VARCHAR(45) NOT NULL ,
    `city_en` VARCHAR(45) NOT NULL ,
    `city_ar` VARCHAR(45) NOT NULL ,
    `region_en` VARCHAR(45) NOT NULL ,
    `region_ar` VARCHAR(45) NOT NULL ,
    `street_no` INT NOT NULL ,
    `building_no` INT NOT NULL ,
    PRIMARY KEY (`id`) ,
    INDEX `fk_address_user1_idx` (`user_id` ASC) ,
    CONSTRAINT `fk_address_user1`
      FOREIGN KEY (`user_id` )
      REFERENCES `shop_1`.`user` (`id` )
      ON DELETE NO ACTION
      ON UPDATE NO ACTION)
  ENGINE = InnoDB;
  </code></pre>
  <hr />
  <p>I am getting this error :&quot;ERROR: Error 1005: Can't create table <code>shop_1</code>.<code>address</code> (errno: 150 &quot;Foreign key constraint is incorrectly formed&quot;)&quot;</p>