Class: CreateWeelerLocks
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateWeelerLocks
- Defined in:
- lib/generators/weeler/templates/migrations/create_weeler_locks.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
10 11 12 13 |
# File 'lib/generators/weeler/templates/migrations/create_weeler_locks.rb', line 10 def self.down remove_index :weeler_locks, :column => :name drop_table :weeler_locks end |
.up ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/generators/weeler/templates/migrations/create_weeler_locks.rb', line 2 def self.up create_table :weeler_locks do |t| t.string :name, :limit => 40 t. end add_index :weeler_locks, :name, :unique => true end |