mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-08 15:14:06 -06:00
Migration for #508
This commit is contained in:
parent
0d4febff85
commit
a442d3d952
@ -22,6 +22,27 @@ class ChangesForV431 extends Migration
|
||||
*/
|
||||
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');
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user