Initial refactoring work
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
use App\Models\Currency;
|
||||
|
||||
class CurrencyAddRounding extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('ab_currency', function (Blueprint $table) {
|
||||
$table->smallInteger('rounding');
|
||||
});
|
||||
|
||||
Currency::query()->update(['rounding'=>2]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('ab_currency', function (Blueprint $table) {
|
||||
$table->dropColumn('rounding');
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user