Skip to content

A free open source IT asset/license management system

Fixes #3632 and #3817 - set archived to default 0 so imported assets will be included in expiring reports

snipe7adfab9d9feb
diff --git a/database/migrations/2017_08_03_160105_set_asset_archived_to_zero_default.php b/database/migrations/2017_08_03_160105_set_asset_archived_to_zero_default.php
new file mode 100644
index 0000000000..5532a65191
--- /dev/null
+++ b/database/migrations/2017_08_03_160105_set_asset_archived_to_zero_default.php
@@ -0,0 +1,30 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class SetAssetArchivedToZeroDefault extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('assets', function (Blueprint $table) {
+ $table->boolean('archived')->default(0)->change();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ //
+ }
+}