Skip to content

Firefly III: a personal finances manager

New migration for #3200

James Cole74eddfa1fac1
diff --git a/database/migrations/2020_07_24_162820_changes_for_v540.php b/database/migrations/2020_07_24_162820_changes_for_v540.php
new file mode 100644
index 0000000000..4896026069
--- /dev/null
+++ b/database/migrations/2020_07_24_162820_changes_for_v540.php
@@ -0,0 +1,40 @@
+<?php
+declare(strict_types=1);
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+/**
+ * Class ChangesForV540
+ */
+class ChangesForV540 extends Migration
+{
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down(): void
+ {
+ Schema::table(
+ 'accounts', static function (Blueprint $table) {
+ $table->dropColumn('order');
+ }
+ );
+ }
+
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up(): void
+ {
+ Schema::table(
+ 'accounts', static function (Blueprint $table) {
+ $table->integer('order', false, true)->default(0);
+ }
+ );
+ }
+}