title: sequelize.js migration execution sequence
body: <p>I have a several queries I want to do in the same migration. They are related so they have to be executed in the particular order. This is my migration's up method:</p>
  
  <pre><code>up: (queryInterface, Sequelize) =&gt;
  queryInterface.sequelize.transaction(transaction =&gt;
    Promise.all([
      queryInterface.renameColumn(table, 'status', 'status_temp', { transaction }),
      queryInterface.sequelize.query(
        'ALTER TYPE enum_users_status RENAME TO enum_users_status_temp;',
        {
          transaction
        }
      ),
      queryInterface.addColumn(
        table,
        'isActive',
        {
          allowNull: false,
          defaultValue: false,
          type: Sequelize.BOOLEAN
        },
        { transaction }
      ),
      queryInterface.bulkUpdate(
        table,
        {
          isActive: true
        },
        {
          status: 'active'
        },
        { transaction }
      ),
      queryInterface.addColumn(
        table,
        'status',
        {
          allowNull: false,
          defaultValue: STATUS_FREE,
          type: Sequelize.ENUM(STATUS_FREE, STATUS_BUSY, STATUS_DELETED)
        },
        { transaction }
      ),
    ])
  ),
  </code></pre>
  
  <p>When I'm executing it order is mixing up in a weird way:</p>
  
  <pre><code>Executing (591dc838-4659-4de4-b605-54b7c03c527f): START TRANSACTION;
  ...
  Executing (591dc838-4659-4de4-b605-54b7c03c527f): ALTER TYPE     enum_users_status RENAME TO enum_users_status_temp;
  Executing (591dc838-4659-4de4-b605-54b7c03c527f): ALTER TABLE "public"."users" ADD COLUMN "isActive" BOOLEAN NOT NULL DEFAULT false;
  Executing (591dc838-4659-4de4-b605-54b7c03c527f): UPDATE "users" SET "isActive"=true WHERE "status" = 'active'
  Executing (591dc838-4659-4de4-b605-54b7c03c527f): CREATE TYPE "public"."enum_users_status" AS ENUM('free', 'busy', 'deleted');ALTER TABLE "public"."users" ADD COLUMN "status" "public"."enum_users_status" NOT NULL DEFAULT 'free';
  Executing (591dc838-4659-4de4-b605-54b7c03c527f): ALTER TABLE "users" RENAME COLUMN "status" TO "status_temp";
  Executing (591dc838-4659-4de4-b605-54b7c03c527f): ROLLBACK;
  </code></pre>
  
  <p>And I'm getting error because of this:</p>
  
  <pre><code>ERROR: column "status" of relation "users" already exists
  </code></pre>
  
  <p>Is there a way to make these queries run in particular order?</p>
  
  <p>UPD:
  My expected result is smth like this</p>
  
  <pre><code>      START TRANSACTION;
        ALTER TABLE "users" RENAME COLUMN "status" TO "status_temp";
        ALTER TYPE enum_users_status RENAME TO enum_users_status_temp;
        ALTER TABLE "public"."users" ADD COLUMN "isNew" BOOLEAN NOT NULL DEFAULT true;
        UPDATE "users" SET "isNew"=false WHERE "status_temp" = 'active';
        CREATE TYPE "public"."enum_users_status" AS ENUM('free', 'busy', 'deleted');
        ALTER TABLE "public"."users" ADD COLUMN "status" "public"."enum_users_status" NOT NULL DEFAULT 'free';
        UPDATE "users" SET "status"='busy' WHERE "isFree" = false;
        UPDATE "users" SET "status"='deleted' WHERE "status_temp" = 'deleted';
        ALTER TABLE "public"."users" DROP COLUMN "isFree";
        ALTER TABLE "public"."users" DROP COLUMN "status_temp";
  </code></pre>