1

I created a migration for a table which has over 2 million records. migration is adding a new column to that table as follow.I am using vagrant as my environment.

Schema::table('tb_selection', function(Blueprint $table) {
            $table->tinyInteger('retired_flag')->after('display_flag')->default(0);
        });

when i ran php artisan migrate, it keeps still and doing nothing. then it throws error

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

then i checked my database and it is crashed. no tables were there. i had to import the DB again. what can be the solution for this?

Deemantha
  • 433
  • 9
  • 30

0 Answers0