Skip to content

A free open source IT asset/license management system

Make purchase cost default to null

snipe6f89699f1a41
diff --git a/database/migrations/2016_08_30_084634_make_purchase_cost_nullable.php b/database/migrations/2016_08_30_084634_make_purchase_cost_nullable.php
new file mode 100644
index 0000000000..c4eef30aa8
--- /dev/null
+++ b/database/migrations/2016_08_30_084634_make_purchase_cost_nullable.php
@@ -0,0 +1,29 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class MakePurchaseCostNullable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('assets', function ($table) {
+ $table->decimal('purchase_cost',8,2)->nullable()->default(null)->change();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ //
+ }
+}