title: How php artisan migrate command uses Connection.php file?
body: <p>I am trying to fix the bug with my Laravel project build and want to understand what steps exactly are done by php artisan migrate command.</p>
  <p>The project uses my custom package.</p>
  <ol>
  <li>I've created a migration in the package, which adds a new column to the existing table:</li>
  </ol>
  <pre><code>    public function up()
      {
          Schema::table('products', function (Blueprint $table) {
              $table-&gt;boolean('is_good_product')-&gt;default(0);
          });
      }
  
      public function down()
      {
          Schema::table('products', function (Blueprint $table) {
              $table-&gt;dropColumn('is_good_product');
          });
      }
  </code></pre>
  <ol start="2">
  <li>Then I put the tag to the package version in my project composer.json file</li>
  </ol>
  <pre><code>'package: dev-master#tag-number'
  </code></pre>
  <p>and ran composer update package to update .lock file.</p>
  <p>3.1. If I run the 'php artisan migrate' command locally I see that the new migration runs and creates needed column.</p>
  <p>3.2. But building the branch on the remote stage server says the following error.</p>
  <pre><code>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'is_good_product' in 'where clause' (SQL: select `name` from `products` where `is_good_product` = 1)  
  </code></pre>
  <p>I see this error when trying to migrate, rollback, refresh, truncate the database. Only creating the column manually helps me do rollback and then migrate.</p>
  <p><strong>Why Connection.php file is looking for this column?</strong> Is the migration from the package was started but wasn't finished? Or what else could happen?</p>
  <p><strong>[Edit]</strong> In other words - why 'artisan migrate' command complains about unknown column of newly added migration file? (it if should run it and add the column). And how Connection.php file can know about the column if the migration didn't run (as column wasn't created)?</p>
  <p><a href="https://i.stack.imgur.com/qa49W.png" rel="nofollow noreferrer">Image of the error message</a></p>