Sha256: d900189e1ad868d68f3413080a9f028dc8f304f3852cc9921429c89fa657301d

Contents?: true

Size: 481 Bytes

Versions: 3

Compression:

Stored size: 481 Bytes

Contents

class CreateAttachments < ActiveRecord::Migration[5.0]
  def change
    create_table :attachments do |t|
      t.string :attachable_type
      t.integer :attachable_id
      t.references :asset
      t.integer :position
      t.boolean :visible
      t.string :locale

      t.timestamps
    end

    add_index :attachments, [:attachable_type, :attachable_id]
    add_index :attachments, :position
    add_index :attachments, :visible
    add_index :attachments, :locale
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
udongo-7.6.2 db/migrate/20180821135446_create_attachments.rb
udongo-7.6.1 db/migrate/20180821135446_create_attachments.rb
udongo-7.6.0 db/migrate/20180821135446_create_attachments.rb