Upgrading


Summary

While upgrading to a new version the following steps need to be taken:

  1. Run composer update noardcode/compass-core.
  2. Execute the step above for each compass package that is installed.
  3. Run php artisan vendor:publish --tag=core-migrations to publish the migrations.
  4. Execute the step above for each compass package that has been updated. Examples crm-migrations, financial-migrations.
  5. Run php artisan migrate to migrate the database.
  6. Run php artisan db:seed CompassSeeder to seed the database.
  7. Run npm install to install the npm packages.
  8. Run npm run prod to compile the new assets.

Publishing migrations

Migrations should be published in the following order:

  1. core-migrations
  2. data-profiling-migrations
  3. crm-migrations
  4. financial-migrations
  5. ecommerce-migrations

Use the following command to ensure the right order:
Packages that are not installed are skipped.

php artisan vendor:publish --tag=core-migrations \
&& php artisan vendor:publish --tag=data-profiling-migrations \
&& php artisan vendor:publish --tag=crm-migrations \
&& php artisan vendor:publish --tag=financial-migrations \
&& php artisan vendor:publish --tag=ecommerce-migrations

Running the seeders

Most projects contain a seeder called CompassSeeder. The seeders provided by compass package should allows be allowed to run to add new menu items, permissions and necessary data for new functionality.

Normally the CompassSeeder is also called in the deployment script of the application in Laravel Forge. If that isn't the case, it should be added to ensure full compass functionality.

Compass Seeders should be run in the following order:

  1. CoreSeeder
  2. DataProfilingSeeder
  3. CrmSeeder
  4. FinancialSeeder
  5. EcommerceSeeder
  6. Your custom project permissions, menu items seeder
  7. Additional seeders provided by the project for functionality that's always allowed to run.

NPM assets

To make use of the sass and js files provided by the compass packages, the following steps need to be taken:

  1. Check if the compass packages that your project uses are included in the package.json file.
  2. Run npm install to install the npm packages.
  3. Check if the compass package dependencies are loaded in your projects root app and js files. These files are probably in the resources/sass/app.scss and resources/js/bootstrap.js files.
  4. Run npm run prod to compile the new assets.

Check the installation guide if some assets are missing