New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

db_version_manager

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

db_version_manager

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

== Installation

sudo apt-get install ruby1.9.1-full ruby1.9.1-dev postgresql libpq-dev sudo gem install pg activerecord-pg-adapter sudo gem install db_version_manager

== Configuration

Configure DB settings in config/database.yml, if needed, change config/initializer.rb

== Usage

Available tasks are: rake db:migrate[version] # Migrates DB to specified version (if no argument given, updates to latest migration). rake db:version # Show current DB version. rake help # Help rake migration:applied # Show migrations that are applied. rake migration:generate[description] # Generate new migration. rake migration:unapplied # Show migrations that are not applied. rake migration:version # Show current latest migration version.

== Example scenario

TODO-s:

  • If you have Gems bin in your path, you can also just run ./db_version_manager
  • Without cloning but with just Gem installation (see first)

=== Obtain db_version-manager

git clone https://github.com/tione/db_version_manager.git cd db_version_manager

=== Configure database

config/database.yml

=== Generate migration template what to edit

rake migration:generate["This is my migration description"]

=== Edit your template in ./app/migrate/date_name.rb

  1. For up() define for example "CREATE TABLE .."
  2. For down() define for example "DROP TABLE .."

=== Migrate changes to DB

rake db:migrate # if no version given, to last is migrated. you can also downgrade so.

FAQs

Package last updated on 20 Jan 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc