Skip to content

A free open source IT asset/license management system

Fixes #4136

snipe52a8597813a8
diff --git a/database/migrations/2017_10_10_123504_allow_nullable_depreciation_id_in_models.php b/database/migrations/2017_10_10_123504_allow_nullable_depreciation_id_in_models.php
new file mode 100644
index 0000000000..fd252bd59c
--- /dev/null
+++ b/database/migrations/2017_10_10_123504_allow_nullable_depreciation_id_in_models.php
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AllowNullableDepreciationIdInModels extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('models', function (Blueprint $table) {
+ $table->integer('depreciation_id')->nullable()->default(null)->change();
+ });
+ Schema::table('licenses', function (Blueprint $table) {
+ $table->integer('depreciation_id')->nullable()->default(null)->change();
+ });
+
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ //
+ }
+}