Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
## 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