RockPaperScissors

LizardSpock

Sequel ORM Migrations

| Comments

Available as a gist a Sequel Migration to rename a database column.

## Command line to apply Migration
#sequel -m ./db/migrate/ -M 1 sqlite://db/data.db
## Command to roll back
#sequel -m ./db/migrate/ -M 0 sqlite://db/data.db

Class.new(Sequel::Migration) do
   def up
      DB.alter_table :aTable do
         rename_column :old, :new
      end
   end

   def down
     DB.alter_table :aTable do
        rename_column :new, :old
     end
   end
end

Comments