Sha256: ffc14de42889f92d9f15cf76e5d050a71bff1bb5cbf719c92b0e05bed5eefde5

Contents?: true

Size: 936 Bytes

Versions: 1

Compression:

Stored size: 936 Bytes

Contents

class CreatePaperclipAtompubAttachments < ActiveRecord::Migration
  def change
    create_table :paperclip_atompub_attachments do |t|
      t.string :instance_type, :null => false
      t.integer :instance_id, :null => false
      t.string :attachment_name, :null => false
      t.string :style, :null => false
      t.string :resource_uri, :null => false
      t.string :content_src, :null => false
      t.timestamps
    end
    add_index :paperclip_atompub_attachments, [:instance_type, :instance_id], :name => 'attachments_on_instance_type_and_instance_id'
    add_index :paperclip_atompub_attachments, [:instance_type, :instance_id, :attachment_name], :name => 'instance_type_and_instance_id_and_attachment_name'
    add_index :paperclip_atompub_attachments, [:instance_type, :instance_id, :attachment_name, :style], :unique => true, :name => 'instance_type_and_instance_id_and_attachment_name_and_style'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paperclip-atompub-0.0.3.4 db/migrate/20121108051952_create_paperclip_atompub_attachments.rb