title: I'm getting (errno: 150 "Foreign key constraint is incorrectly formed") but engine is set to innoDb and types are the same
body: <p>I basically have 2 simple tables and i reference the primary key of users from the articles table. The engine is set to innoDB and how you can see the data types are int on both ends.</p>
  <p>My buddy has the same tables inserted into his database without any errors.
  He uses XAMPP and I use Docker if this matters</p>
  <p>The errormessage:</p>
  <p>ERROR 1005 (HY000) at line 25: Can't create table <code>CMS</code>.<code>Article</code> (errno: 150 &quot;Foreign key constraint is incorrectly formed&quot;)</p>
  <pre><code>CREATE TABLE IF NOT EXISTS USERS (
      id int auto_increment primary key,
      username varchar(255) NOT NULL,
      password varchar(255) NOT NULL,
      role ENUM(&quot;user&quot;, &quot;admin&quot;) NOT NULL
  );
  
  CREATE TABLE IF NOT EXISTS Article(
      id int auto_increment primary key,
      userId int NOT NULL,
      title varchar(255) NOT NULL,
      date date NOT NULL,
      content TEXT NOT NULL,
      FOREIGN KEY(userId) REFERENCES users(id)
  );
  
  </code></pre>
  <p>How can i solve this unexpected error?</p>