Reward Loyalty Documentation

Upgrade to Version 2

Due to significant restructuring in Laravel 11, the upgrade to Version 2 is not backward compatible. If you have existing data and want to migrate it to Version 2, please follow these steps:

  1. Create a New Domain or Subdomain and Upload the Latest Version:

    • Set up a new domain or subdomain where you will upload the latest version of the script.
    • Upload the latest version of the script to the root directory of your new domain or subdomain.
    • Note: There is no need to run the installation process at this point.
  2. Copy the Configuration File:

    • Copy the .env file from the root of your Version 1 installation to the root of your Version 2 installation.
  3. Migrate Your Database:

    • If You're Using SQLite:
      • Copy the database/database.sqlite file from your Version 1 installation to the database/ directory in your Version 2 installation. Overwrite if necessary.
    • If You're Using MySQL or MariaDB:
      • Continue using the same database by keeping the existing settings in the .env file.
      • There's no need to export or import the database; just ensure the existing database remains intact and is not deleted.
  4. Transfer Public Files:

    • Copy all files and directories from the public/files folder of your Version 1 installation to the corresponding public/files folder in your Version 2 installation.
    • This includes all user-uploaded content and other essential public files.
  5. Verify the Installation:

    • Verify that everything is functioning correctly.
    • Ensure all data has been correctly migrated and that the application is working as expected.
    • Test all major features to confirm they are operating properly.
  6. Update Domain Settings:

    • If You Manage DNS Settings:
      • Update your DNS records to point your old domain to the new Version 2.
      • Remove any DNS settings pointing to your old Version 1 installation.
      • Be aware that DNS propagation may take some time due to caching.
    • If Using cPanel or Similar Tools:
      • If you don't manage DNS directly:
        • Remove the domain or subdomain from your old Version 1 installation within cPanel.
        • Add this domain or subdomain to your new Version 2 installation in cPanel.

By following these steps, you can successfully migrate to Version 2, ensuring a smooth transition with minimal downtime and data loss.