Skip to content

A free open source IT asset/license management system

Make supplier_id nullable

sniped329d6104e5c
diff --git a/database/migrations/2025_06_06_155058_make_supplier_id_nullable.php b/database/migrations/2025_06_06_155058_make_supplier_id_nullable.php
new file mode 100644
index 0000000000..f71eeb8d96
--- /dev/null
+++ b/database/migrations/2025_06_06_155058_make_supplier_id_nullable.php
@@ -0,0 +1,27 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::table('asset_maintenances', function (Blueprint $table) {
+ $table->integer('supplier_id')->nullable()->default(null)->change();
+ });
+
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ //
+ }
+};