Class: CreateFields

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
pages/db/migrate/3_create_fields.rb

Class Method Summary collapse

Class Method Details

.downObject



14
15
16
# File 'pages/db/migrate/3_create_fields.rb', line 14

def self.down
  drop_table ConstructorPages::Field.table_name
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
# File 'pages/db/migrate/3_create_fields.rb', line 2

def self.up
  create_table ConstructorPages::Field.table_name do |t|
    t.string :name
    t.string :code_name
    t.string :type_value
    t.integer :position
    t.references :template

    t.timestamps
  end
end