Class: CreateE9Attributes

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

Class Method Summary collapse

Class Method Details

.downObject



10
11
12
# File 'lib/generators/e9_attributes/templates/migration.rb', line 10

def self.down
  drop_table :record_attributes
end

.upObject



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

def self.up
  create_table :record_attributes, :force => true do |t|
    t.string :type
    t.references :record, :polymorphic => true
    t.text :value, :options, :limit => 3.kilobytes
  end
end