Class: CreateContentBlobs

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

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/generators/templates/create_content_blobs.rb', line 13

def self.down
  drop_table :content_blobs
end

.upObject



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

def self.up
  create_table :content_blobs do |t|
    t.integer  "blobable_id"
    t.string   "blobable_type"
    t.text     "contents",       :limit => 2147483647
    t.timestamps
  end

  add_index :content_blobs, [:blobable_type, :blobable_id]
end