Skip to content

Firefly III: a personal finances manager

Fix for #310: add migration that correctly sets nullable for description fields on rules and rule_groups

Sander Mulders539058e32d13
diff --git a/database/migrations/2016_09_12_121359_fix_nullables.php b/database/migrations/2016_09_12_121359_fix_nullables.php
new file mode 100644
index 0000000000..cb51287c9f
--- /dev/null
+++ b/database/migrations/2016_09_12_121359_fix_nullables.php
@@ -0,0 +1,39 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class FixNullables extends Migration {
+
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table(
+ 'rule_groups', function (Blueprint $table)
+ {
+ $table->text('description')->nullable()->change();
+ }
+ );
+
+ Schema::table(
+ 'rules', function (Blueprint $table)
+ {
+ $table->text('description')->nullable()->change();
+ }
+ );
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+
+ }
+}