From db26412e6c155a40bca58cf2982911e1f3fb370c Mon Sep 17 00:00:00 2001 From: msquare Date: Thu, 27 Dec 2018 19:08:35 +0100 Subject: fixes #549: fill missing arrival dates and prevent setting arrival by admin-user instead of admin-arrive --- ...2018_12_27_000000_fix_missing_arrival_dates.php | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 db/migrations/2018_12_27_000000_fix_missing_arrival_dates.php (limited to 'db') diff --git a/db/migrations/2018_12_27_000000_fix_missing_arrival_dates.php b/db/migrations/2018_12_27_000000_fix_missing_arrival_dates.php new file mode 100644 index 00000000..b932158c --- /dev/null +++ b/db/migrations/2018_12_27_000000_fix_missing_arrival_dates.php @@ -0,0 +1,27 @@ +whereArrivalDate(null)->get(); + foreach($states as $state) { + $state->arrival_date = $state->user->personalData->planned_arrival_date; + $state->save(); + } + } + + /** + * Down is not possible and not needed since this is a bugfix. + */ + public function down() + {} +} -- cgit v1.2.3-54-g00ecf