Will also upgrade database. #508

This commit is contained in:
James Cole
2016-12-29 20:19:20 +01:00
parent a442d3d952
commit 6a13dd317d
2 changed files with 44 additions and 7 deletions

View File

@@ -25,10 +25,16 @@ class ChangesForV431 extends Migration
// reinstate "repeats" and "repeat_freq".
Schema::table(
'budget_limits', function (Blueprint $table) {
$table->string('repeat_freq', 30);
$table->string('repeat_freq', 30)->nullable();
}
);
Schema::table(
'budget_limits', function (Blueprint $table) {
$table->boolean('repeats')->default(0);
}
);
// remove date field "end_date"
Schema::table(
'budget_limits', function (Blueprint $table) {
@@ -37,11 +43,11 @@ class ChangesForV431 extends Migration
);
// change field "start_date" to "startdate"
Schema::table(
'budget_limits', function (Blueprint $table) {
$table->renameColumn('startdate', 'start_date');
}
);
// Schema::table(
// 'budget_limits', function (Blueprint $table) {
// $table->renameColumn('startdate', 'start_date');
// }
// );
}
@@ -77,9 +83,15 @@ class ChangesForV431 extends Migration
Schema::table(
'budget_limits', function (Blueprint $table) {
$table->dropColumn('repeats');
}
);
Schema::table(
'budget_limits', function (Blueprint $table) {
$table->dropColumn('repeat_freq');
}
);
}
}