Class: CreateFloatTypes

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

Class Method Summary collapse

Class Method Details

.downObject



12
13
14
# File 'pages/db/migrate/5_create_float_types.rb', line 12

def self.down
  drop_table ConstructorPages::Types::FloatType.table_name
end

.upObject



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

def self.up
  create_table ConstructorPages::Types::FloatType.table_name do |t|
    t.float :value, :default => 0.0
    t.references :field
    t.references :page

    t.timestamps
  end
end