Class: Istox::CreateLocks

Inherits:
Object
  • Object
show all
Defined in:
lib/istox/migrations/create_locks.rb

Class Method Summary collapse

Class Method Details

.downObject



12
13
14
15
# File 'lib/istox/migrations/create_locks.rb', line 12

def self.down
  remove_index :locks, :column => :name
  drop_table :locks
end

.upObject



4
5
6
7
8
9
10
# File 'lib/istox/migrations/create_locks.rb', line 4

def self.up
  create_table :locks do |t|
    t.string :name, :limit => 40
    t.timestamps
  end
  add_index :locks, :name, :unique => true
end