check for phone column & verrion last digit check in installer

This commit is contained in:
rahul shukla 2019-06-28 15:18:48 +05:30
parent 07ec9cd28a
commit fdb9252b2a
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@ class AddPhoneColumnInCustomersTable extends Migration
public function up()
{
Schema::table('customers', function (Blueprint $table) {
$table->string('phone')->unique()->nullable();
if (! Schema::hasColumn('customers', 'phone')) {
$table->string('phone')->unique()->nullable();
}
});
}