Skip to content

arunagw/rake_migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RakeMigration
=============

RakeMigration gives you relief when you are working in a team and you have different-2 application environments.

This plugin helps to run rake tasks in series and keep track of tasks which are pending on environment.

This plugin works is similar to db migrations.

If you working in a team environment where you forget to tell your team member to run a rake task, Then this plugin will help you a lot.



Installation
============

Rails 2_x users
================
ruby script/plugin install git://github.com/arunagw/rake_migration.git -r 2_X


Rails 3 
================

rails plugin install git://github.com/arunagw/rake_migration.git

Example
=======

Usage: script/generate rake_migration FileName 

Description:
    Stubs out a new rake migration. Pass the file name, either
    
    A file is generated in rake/migrate prefixed by a timestamp of the current date and time.


Example:
    `./script/generate rake_migration SetAllUserActive`

    If the current date is May 14, 2008 and the current time 09:09:12, this creates
    rake/migrate/20080514090912_set_all_user_active.rb

    If our User Model having a boolean column for active. 
   
    # Can add this code in file to update set user as active. 
    #User.all.each do |u|
    #  u.update_attribute(:active, true)
    #end

Apply Changes:

    To apply your changes into the Application need to run

    rake rake_migration:migrate
    Will run pending file onto your Application DB.

    rake rake_migration:migrate:run VERSION=XXXXXX
    Will run only specified version number file 

Submitting Patches

Fork the project.
Commit your feature or bug fix.
Add tests for it. This is important so it doesn’t break in the future.
Do not mess with gemspec, version, or history. (If you want to have your own version, that’s fine, but please do so in a separate commit.)
Submit a pull request.



Thanks
======

Vishnu Atrai

Copyright (c) 2010 [Arun Agrawal], released under the MIT license


Releases

No releases published

Packages

No packages published

Languages