Skip to content

Firefly III: a personal finances manager

Migrations for future version 3.2.2

James Cole62748fa2552e
diff --git a/.gitignore b/.gitignore
index 71d8f61ce0..ccc58cf470 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@ tests/unit/UnitTester.php
pi.php
tests/_data/db.sqlite
tests/_data/dump.sql
+db.sqlite_snapshot
diff --git a/app/database/migrations/2014_12_24_191544_changes_for_v322.php b/app/database/migrations/2014_12_24_191544_changes_for_v322.php
new file mode 100644
index 0000000000..49a66708c8
--- /dev/null
+++ b/app/database/migrations/2014_12_24_191544_changes_for_v322.php
@@ -0,0 +1,43 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+
+/**
+ * Class ChangesForV322
+ */
+class ChangesForV322 extends Migration
+{
+ /**
+ *
+ */
+ public function down()
+ {
+
+ }
+
+
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ // rename tables:
+ Schema::rename('piggybank_repetitions', 'piggy_bank_repetitions');
+ Schema::rename('piggybanks', 'piggy_banks');
+ Schema::table(
+ 'piggy_bank_events', function (Blueprint $table) {
+ $table->renameColumn('piggybank_id', 'piggy_bank_id');
+ }
+ );
+
+ Schema::table(
+ 'piggy_bank_repetitions', function (Blueprint $table) {
+ $table->renameColumn('piggybank_id', 'piggy_bank_id');
+ }
+ );
+ }
+
+}