24 lines
679 B
PHP
24 lines
679 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::table('currencies', function (Blueprint $table) {
|
|
$table->decimal('exchange_rate_to_base', 15, 6)->default(1.00)->after('decimal_places');
|
|
$table->boolean('is_base')->default(false)->after('exchange_rate_to_base');
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::table('currencies', function (Blueprint $table) {
|
|
$table->dropColumn(['exchange_rate_to_base', 'is_base']);
|
|
});
|
|
}
|
|
};
|