JustOneDB Command Line Interface

The JustOneDB CLI is used to handle data migrations for JustOneDB Cloud Services accessed via Heroku

For more information, see <www.justonedb.com>.

For platform specific details, go to the following

Pre-Requisites

The PostgreSQL client program ‘pg_dump’ must be installed in order to use the migrate function.

Installation

$ gem install justonedb

Commands

  • Migrate JustOneDB database from current to ‘NEW’ on Heroku

    $ justonedb heroku migrate
    Extracting data from JUSTONEDB_DBI_URL using pg_dump
    Importing data into JUSTONEDB_NEW_DBI_URL using psql
    Data imported successfully, please fully check your application before running 'justonedb heroku promote'
    
  • Promote ‘NEW’ variables to current

    $ justonedb heroku promote
    Promoting JustOneDB 'NEW' vars to current, and saving current to 'OLD'
    Variables modified, please check that your application works correctly, before running 'justonedb heroku purge-old'
    
  • Purge ‘OLD’ variables

    $ justonedb heroku purge-old
    Purging JustOneDB 'OLD' configuration variables
    
  • Set default Heroku database to connect to JustOneDB

    $ justonedb heroku make-default
    Making JUSTONEDB_DBI_URL the default Rails database
    DATABASE_URL now points directly to the JustOneDB database; application restarting
    
  • Reset default Heroku database from saved settings

    $ justonedb heroku reset-default
    Resetting DATABASE_URL from JUSTONEDB_SAVED_DATABASE_URL
    DATABASE_URL has now been reset, application restarting
    

License

Released under the [MIT license](www.opensource.org/licenses/mit-license.php).

Credits

Created by Daryl Waycott