invoiceninja/database/migrations/2023_10_10_083024_add_ariary_currency.php
2023-11-26 18:41:42 +11:00

37 lines
708 B
PHP

<?php
use App\Models\Currency;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration {
/**
* Run the migrations.
*/
public function up(): void
{
$cur = Currency::find(119);
if(!$cur) {
$cur = new \App\Models\Currency();
$cur->id = 119;
$cur->code = 'MGA';
$cur->name = 'Malagasy ariary';
$cur->symbol = 'Ar';
$cur->thousand_separator = ',';
$cur->decimal_separator = '.';
$cur->precision = 0;
$cur->save();
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};