title: Yii2 migration transaction methods, safeup() and safedown() not working
body: <p>I am using the safeUp and safeDown methods for Database transactions in yii but it seems not to be working. Here is my code below:</p>
  
  <pre><code>    public function safeUp()
  {
      $this-&gt;createTable(self::TABLE_EMPLOYMENT_HISTORY, [
          'id' =&gt; $this-&gt;integer() . ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',
          'user_id' =&gt; $this-&gt;integer()-&gt;unsigned()-&gt;notNull(),
          'start_date' =&gt; $this-&gt;dateTime()-&gt;notNull(),
          'end_date' =&gt; $this-&gt;dateTime(),
          'role' =&gt; $this-&gt;string(150)-&gt;notNull(),
          'position' =&gt; $this-&gt;string(50)-&gt;notNull(),
          'achievements' =&gt; $this-&gt;text(),
          'created_at' =&gt; $this-&gt;dateTime()-&gt;notNull(),
          'updated_at' =&gt; $this-&gt;dateTime()-&gt;notNull(),
          'status' =&gt; $this-&gt;string(50)-&gt;notNull()
      ]);
      $this-&gt;addForeignKey('fk_' . self::TABLE_EMPLOYMENT_HISTORY . '_' . self::TABLE_USERS . '_id', self::TABLE_EMPLOYMENT_HISTORY, 'user_id', self::TABLE_USERS, 'id');
      $this-&gt;addForeignKey('fk_' . self::TABLE_EMPLOYMENT_HISTORY . '_' . self::TABLE_STATUSES . '_key', self::TABLE_MISTAKE, 'status', self::TABLE_STATUSES, 'key');
  }
  
  public function safeDown()
  {
      $this-&gt;dropForeignKey('fk_' . self::TABLE_EMPLOYMENT_HISTORY . '_' . self::TABLE_STATUSES . '_key', self::TABLE_EMPLOYMENT_HISTORY);
      $this-&gt;dropForeignKey('fk_' . self::TABLE_EMPLOYMENT_HISTORY . '_' . self::TABLE_USERS . '_id', self::TABLE_EMPLOYMENT_HISTORY);
      $this-&gt;dropTable(self::TABLE_EMPLOYMENT_HISTORY);
  
  }
  </code></pre>
  
  <p>When I ran that, It said of course that the table <code>TABLE_MISTAKE</code> does not exist when trying to create the foreign key. I was expecting a rollback  but that did not happen, instead, it went ahead to create the table 'EMPLOYMENT_HISTORY'. </p>
  
  <p>Why is it creating the table despite using the safeup method?</p>
  
  <p>Your help would be appreciated.</p>