mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 13:42:49 +01:00
Remove seeder from migration to prevent class not found errors
This commit is contained in:
parent
a921abfc78
commit
1d12f58a37
@ -608,7 +608,7 @@ if (!defined('CONTACT_EMAIL')) {
|
||||
define('NINJA_WEB_URL', env('NINJA_WEB_URL', 'https://www.invoiceninja.com'));
|
||||
define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com'));
|
||||
define('NINJA_DATE', '2000-01-01');
|
||||
define('NINJA_VERSION', '2.6.7' . env('NINJA_VERSION_SUFFIX'));
|
||||
define('NINJA_VERSION', '2.6.8' . env('NINJA_VERSION_SUFFIX'));
|
||||
|
||||
define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'));
|
||||
define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja'));
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Models\PaymentStatus;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
@ -20,7 +21,26 @@ class PaymentsChanges extends Migration
|
||||
$table->string('name');
|
||||
});
|
||||
|
||||
(new \PaymentStatusSeeder())->run();
|
||||
$statuses = [
|
||||
['id' => '1', 'name' => 'Pending'],
|
||||
['id' => '2', 'name' => 'Voided'],
|
||||
['id' => '3', 'name' => 'Failed'],
|
||||
['id' => '4', 'name' => 'Completed'],
|
||||
['id' => '5', 'name' => 'Partially Refunded'],
|
||||
['id' => '6', 'name' => 'Refunded'],
|
||||
];
|
||||
|
||||
Eloquent::unguard();
|
||||
foreach ($statuses as $status) {
|
||||
$record = PaymentStatus::find($status['id']);
|
||||
if ($record) {
|
||||
$record->name = $status['name'];
|
||||
$record->save();
|
||||
} else {
|
||||
PaymentStatus::create($status);
|
||||
}
|
||||
}
|
||||
Eloquent::reguard();
|
||||
|
||||
Schema::dropIfExists('payment_methods');
|
||||
|
||||
@ -92,7 +112,7 @@ class PaymentsChanges extends Migration
|
||||
$table->foreign('default_payment_method_id')->references('id')->on('payment_methods');
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user