class CreateLocks < ActiveRecord::Migration def self.up create_table :locks do |t| t.string :resource_name, :null => false t.string :key, :null=>false t.datetime :lock_expiry_time, :null => false t.string :caller_key, :null=>false t.boolean :locked, :null=>false, :default=>false t.timestamps end end def self.down drop_table :locks end end