Upgrades

From DreamFactory
Jump to: navigation, search

Upgrading DreamFactory involves getting the required code via git and composer and then using the Laravel artisan command migrate system data and settings.

Notes and Prerequisites

  1. Linux users need to have Git installed, which can be obtained from your operating system's package manager.
  2. In these instructions, we will assume that your instance is installed at ~/dreamfactory-2.X.X-X/. Anywhere you see this path substitute your own install path.
  3. These instructions also assume you did not install with sudo. If you did install with sudo, you will need to append it the commands below as well.
  4. PHP
    • You can add the path to your PHP executable to the system PATH variable to make calling your php easier.
      • The path is ~/dreamfactory-2.X.X-X/php/bin/
    • These instructions will assume you have NOT done this and will instead include the full path to the executable (../../../php/bin/php...)
    • If you have added PHP to the system PATH you may replace every instance of ../../../php/bin/php with just php.

Upgrade the System

  1. Navigate to the install directory
    • <source lang="bash">$ cd ~/dreamfactory-2.X.X-X/apps/dreamfactory/htdocs</source>
  2. Stash and changes tracked by git
    • <source lang="bash">$ git stash</source>
  3. Get the latest code
    • <source lang="bash">$ git checkout master</source>
    • <source lang="bash">$ git pull origin master</source>
      • If you receive an error indicating that you have uncommitted changes, back up the files indicated by the error and then delete them from this folder. Repeat the above step.
  4. Update composer
    • <source lang="bash">$ ../../../php/bin/php composer.phar self-update</source>
  5. User composer to get dependencies
    • Note for commercial users: Copy your commercial license files into the working directory (~/dreamfactory-2.X.X-X/apps/dreamfactory/htdocs/) before running this command.

IF NOT USING ORACLE OR MONGODB RUN <source lang="bash">$ ../../../php/bin/php composer.phar install --no-dev --ignore-platform-reqs</source> Otherwise 5. <source lang="bash">$ ../../../php/bin/php composer.phar install --no-dev</source>

  • Migrate the system data

6. <source lang="bash">$ ../../../php/bin/php artisan migrate --seed</source>

  • Clear caches

7. <source lang="bash">$ ../../../php/bin/php artisan config:clear</source> 8. <source lang="bash">$ ../../../php/bin/php artisan cache:clear</source> 9. Log in to your instance in the browser (you may need to refresh/clear browser cache.) Go to the Config tab and confirm the instance was upgraded.