Skip to content

Instantly share code, notes, and snippets.

@morganp
Created March 29, 2010 17:09
Show Gist options
  • Save morganp/348121 to your computer and use it in GitHub Desktop.
Save morganp/348121 to your computer and use it in GitHub Desktop.
## Command line to apply Migration
#sequel -m ./db/migrate/ -M 4 sqlite://db/blog.db
## Command to roll back
#sequel -m ./db/migrate/ -M 3 sqlite://db/blog.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment