Class: CreateSections

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/engine_room/templates/002_create_sections.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/generators/engine_room/templates/002_create_sections.rb', line 13

def self.down
  drop_table :sections
end

.upObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/engine_room/templates/002_create_sections.rb', line 2

def self.up
  create_table(:sections) do |t|
    t.string  :name, :null => false
    t.string  :model_name, :null => false
    t.string  :view_type
    t.string  :condition
    t.integer :sort_order
    t.timestamps
  end
end