Sha256: ec64555599aa119ec13d191caf2442f0b7151f4ba34082ebcc9a93f490c8357e

Contents?: true

Size: 920 Bytes

Versions: 5

Compression:

Stored size: 920 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

5 entries across 5 versions & 1 rubygems

Version Path
paperclip-atompub-0.0.3.3 db/migrate/20121108051952_create_paperclip_atompub_attachments.rb
paperclip-atompub-0.0.3.2 db/migrate/20121108051952_create_paperclip_atompub_attachments.rb
paperclip-atompub-0.0.3.1 db/migrate/20121108051952_create_paperclip_atompub_attachments.rb
paperclip-atompub-0.0.3 db/migrate/20121108051952_create_paperclip_atompub_attachments.rb
paperclip-atompub-0.0.1 db/migrate/20121108051952_create_paperclip_atompub_attachments.rb