Sha256: e1ca57bfc284f8190da12c9c4524ec3ff25f20eed4ee3f995be4d33d2c917651
Contents?: true
Size: 1.68 KB
Versions: 1
Compression:
Stored size: 1.68 KB
Contents
# SwitchDb A command-line interface for a database dumpfile ## Installation ### from rubygems ``` gem install switch_db ``` ### from github ```sh git clone https://github.com/alpaca-tc/switch_db cd switch_db bundle install bundle exec rake install ``` ## Usage ``` # Show dumpfile list switch_db list # Change user_name and as so on switch_db config [key:value...] # Remove dumpfile switch_db rm <name> # Store database switch_db store <name> --database_names [database_name,database_name...] # Restore database switch_db restore <name> ``` Example ``` # Show list $ switch_db list 0: initial_database 1: new_feature 2: latest_database $ echo $(git rev-parse --abbrev-ref HEAD) master # Store databases $ switch_db store $(git rev-parse --abbrev-ref HEAD) --database_names application_development,application_test Stored database a 'application_development' Stored database a 'application_test' $ switch_db list 0: initial_database 1: new_feature 2: latest_database 3: master # Restore databases $ switch_db restore master Restored database a 'application_development' Restored database a 'application_test' # Set default username and password switch_db config user_name:root password:password # Remove config switch_db config user_name: password: ``` ## Development After checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests. To install this gem onto your local machine, run `bundle exec rake install`. ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/alpaca-tc/switch_db. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
switch_db-0.1.1 | README.md |