mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 02:03:40 +00:00
Migration for #508
This commit is contained in:
@@ -22,6 +22,27 @@ class ChangesForV431 extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
|
// reinstate "repeats" and "repeat_freq".
|
||||||
|
Schema::table(
|
||||||
|
'budget_limits', function (Blueprint $table) {
|
||||||
|
$table->string('repeat_freq', 30);
|
||||||
|
$table->boolean('repeats')->default(0);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// remove date field "end_date"
|
||||||
|
Schema::table(
|
||||||
|
'budget_limits', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('end_date');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// change field "start_date" to "startdate"
|
||||||
|
Schema::table(
|
||||||
|
'budget_limits', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('startdate', 'start_date');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,5 +59,27 @@ class ChangesForV431 extends Migration
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// change field "startdate" to "start_date"
|
||||||
|
Schema::table(
|
||||||
|
'budget_limits', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('startdate', 'start_date');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// add date field "end_date" after "start_date"
|
||||||
|
Schema::table(
|
||||||
|
'budget_limits', function (Blueprint $table) {
|
||||||
|
$table->date('end_date')->nullable()->after('start_date');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// drop "repeats" and "repeat_freq".
|
||||||
|
Schema::table(
|
||||||
|
'budget_limits', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('repeats');
|
||||||
|
$table->dropColumn('repeat_freq');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user