Skip to content

Commit

Permalink
Fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
shihjay2 committed Feb 5, 2021
1 parent cdb4245 commit 3fe0c5e
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ class EditUnitInBillingCoreTable extends Migration {
*/
public function up()
{

DB::statement('ALTER TABLE billing_core MODIFY COLUMN unit VARCHAR(255)');
Schema::table('billing_core', function(Blueprint $table)
{
$table->string('unit', 255)->nullable()->change();
});
}

/**
Expand All @@ -23,7 +25,10 @@ public function up()
*/
public function down()
{
DB::statement('ALTER TABLE billing_core MODIFY COLUMN unit VARCHAR(1)');
Schema::table('billing_core', function(Blueprint $table)
{
$table->string('unit', 1)->nullable()->change();
});
}

}

0 comments on commit 3fe0c5e

Please sign in to comment.