Class: CreateEmptyEyeViewsTable

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/rails/generators/empty_eye/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#downObject



11
12
13
# File 'lib/rails/generators/empty_eye/templates/migration.rb', line 11

def down
  drop_table :empty_eye_views  
end

#upObject



2
3
4
5
6
7
8
9
# File 'lib/rails/generators/empty_eye/templates/migration.rb', line 2

def up
  create_table :empty_eye_views, :force => true do |t|
    t.string :view_name, :null => false
    t.string :version, :limit => 32, :null => false
  end
  
  add_index :empty_eye_views, :view_name
end