Skip to content

Commit 659ffc8

Browse files
committed
support v4
1 parent 1dfd6b2 commit 659ffc8

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

database/migrations/2023_11_25_144235_create_invoices_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function up()
5353
$table->boolean('send_email')->default(0)->nullable();
5454

5555
// Bank Account
56-
$table->foreignId('currency_id')->nullable()->constrained('currencies');
56+
$table->unsignedBigInteger('currency_id')->nullable();
5757
$table->boolean('is_bank_transfer')->default(false)->nullable();
5858
$table->string('bank_account')->nullable();
5959
$table->string('bank_account_owner')->nullable();
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
Schema::table('invoices', function (Blueprint $table) {
15+
$table->dropForeign(['currency_id']);
16+
});
17+
}
18+
19+
/**
20+
* Reverse the migrations.
21+
*/
22+
public function down(): void
23+
{
24+
Schema::table('invoices', function (Blueprint $table) {
25+
$table->foreign('currency_id')->references('id')->on('currencies');
26+
});
27+
}
28+
};

0 commit comments

Comments
 (0)