-
Notifications
You must be signed in to change notification settings - Fork 19
Upgrading Lara 1.5 to 2.0
The 2.0 version of Lara has a lot of changes in the application architecture. With the upgrade the database schema will be partially changed and all existing events converted to the new standard. This change can not be rolled back afterwards.
To prevent data loss and make the transition as easy as possible, please follow this guide to install a clean new Lara 2.0, update the database to the new standard and then link them together. All events/task and other data will remain in place and can still be accessed after the upgrade.
-
Stop the application to prevent further changes to the DB during the upgrade (run "php artisan down" in the "lara-vedst" folder via the command line)
-
Make a complete backup of the production application (folder "lara-vedst" by default)
-
Make a complete backup of the database (e.g. via "Data Export" in MySQL Workbench)
-
Install a new instance of lara-vedst with files from branch "master" following any installation guide from this wiki.
- Make sure your new installation is in maintenance mode afterwards (run "php artisan down" in the "lara-vedst" folder via the command line)
- (On Linux) Don't forget to change folder permission and restart the server afterwards.
- Do not link the production database to the application until you have downloaded dependencies via "composer update"
-
Run migration "2016_04_24_141145_add-showTo-filter"
-
Run migration "2016_05_04_134614_remove_obsolete_schedule_columns"
- A script inside goes through the whole database, adding a new event to each schedule without one. This practically converts all Tasks (represented through a Schedule without a ClubEvent) into "normal" ClubEvents of a certain type by matching schedule title with known event types or assigning generic "internal task" type otherwise.
- This change can not be rolled back!
- Edit the following files manually according to your production environment:
- environment variables in the file ".env" located in the "lara-vedst" folder for things like application key, debugging on/off and database connection.
- "LoginController.php" in "lara-vedst/app/Http/Controllers" to switch between Authentification workaround and your production auth routines
- Restart the application (run "php artisan up" in the "lara-vedst" folder via the command line)
This should be it. Keep flying :)