Class: Istox::CreateLocks
- Inherits:
-
Object
- Object
- Istox::CreateLocks
- Defined in:
- lib/istox/migrations/create_locks.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
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 |
.up ⇒ Object
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. end add_index :locks, :name, :unique => true end |