diff --git a/config/firefly.php b/config/firefly.php index 393aa77c39..fe4724a449 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -2,7 +2,7 @@ return [ 'chart' => 'chartjs', - 'version' => '3.8.4', + 'version' => '3.9.0', 'index_periods' => ['1D', '1W', '1M', '3M', '6M', '1Y', 'custom'], 'budget_periods' => ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'], 'csv_import_enabled' => true, diff --git a/database/migrations/2016_04_25_093451_changes_for_v385.php b/database/migrations/2016_04_25_093451_changes_for_v390.php similarity index 91% rename from database/migrations/2016_04_25_093451_changes_for_v385.php rename to database/migrations/2016_04_25_093451_changes_for_v390.php index 9783b045b9..0afc024bf1 100644 --- a/database/migrations/2016_04_25_093451_changes_for_v385.php +++ b/database/migrations/2016_04_25_093451_changes_for_v390.php @@ -5,9 +5,9 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; /** - * Class ChangesForV385 + * Class ChangesForV390 */ -class ChangesForV385 extends Migration +class ChangesForV390 extends Migration { /** * Reverse the migrations. @@ -16,6 +16,14 @@ class ChangesForV385 extends Migration */ public function down() { + // restore removed unique index. Recreate it the correct way: + Schema::table( + 'budget_limits', function (Blueprint $table) { + $table->unique(['budget_id', 'startdate', 'repeat_freq'], 'unique_bl_combi'); + } + ); + + $backup = $this->backupRepeatFreqsFromString(); // drop string and create enum field @@ -48,15 +56,21 @@ class ChangesForV385 extends Migration */ public function up() { - // remove an index. + // // remove an index. + Schema::table( + 'budget_limits', function (Blueprint $table) { + $table->dropForeign('bid_foreign'); + } + ); + Schema::table( 'budget_limits', function (Blueprint $table) { $table->dropUnique('unique_limit'); - $table->dropForeign('bid_foreign'); $table->dropUnique('unique_bl_combi'); } ); + // recreate foreign key: Schema::table( 'budget_limits', function (Blueprint $table) { @@ -65,7 +79,6 @@ class ChangesForV385 extends Migration ); - // backup values $backup = $this->backupRepeatFreqsFromEnum();