Skip to content

Instantly share code, notes, and snippets.

@wereHamster
Created April 18, 2011 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wereHamster/925165 to your computer and use it in GitHub Desktop.
Save wereHamster/925165 to your computer and use it in GitHub Desktop.
class CreateLocksTable < ActiveRecord::Migration
def self.up
create_table :locks, :id => false do |t|
t.string :name
t.string :owner
t.datetime :time
end
add_index :locks, :name
end
def self.down
destroy_table :locks
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment