Skip to content

Instantly share code, notes, and snippets.

@sdsdkkk
Created September 3, 2015 07:04
Show Gist options
  • Save sdsdkkk/aeb8e0ec1d4f32a9fe1b to your computer and use it in GitHub Desktop.
Save sdsdkkk/aeb8e0ec1d4f32a9fe1b to your computer and use it in GitHub Desktop.
Sample DB Migration with LHM
class TestingLhm < ActiveRecord::Migration
def self.up
Lhm.change_table :rand_numbers do |t|
t.add_column :something, "INT(12)"
t.add_index :something
end
end
def self.down
Lhm.change_table :rand_numbers do |t|
t.remove_index :something
t.remove_column :something
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment