Skip to content

A free open source IT asset/license management system

Make serial nullable

snipe738896bdc234
diff --git a/database/migrations/2019_02_20_234421_make_serial_nullable.php b/database/migrations/2019_02_20_234421_make_serial_nullable.php
new file mode 100644
index 0000000000..fc28932a83
--- /dev/null
+++ b/database/migrations/2019_02_20_234421_make_serial_nullable.php
@@ -0,0 +1,30 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class MakeSerialNullable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('assets', function (Blueprint $table) {
+ $table->string('serial')->nullable()->default(null)->change();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ //
+ }
+}