Sha256: dc1dbee4f4fe0bbc95a8e0fbdb4746483c206b25b71e3412959958117a4c5b8a

Contents?: true

Size: 366 Bytes

Versions: 3

Compression:

Stored size: 366 Bytes

Contents

class CreateTbCommerceImages < ActiveRecord::Migration
  def change
    create_table :tb_commerce_images do |t|
      t.string :name #something to call this image in UI.
      t.references :imageable, polymorphic: true, index: true #we can attach these to almost anything
      t.attachment :image #the image itself

      t.timestamps null: false
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_commerce-0.0.4 db/migrate/20150423011012_create_tb_commerce_images.rb
tb_commerce-0.0.3 db/migrate/20150423011012_create_tb_commerce_images.rb
tb_commerce-0.0.2 db/migrate/20150423011012_create_tb_commerce_images.rb