Sha256: a9370979bf47d13c2e676597902569d2d78ed0e3776f9b815bcef987583b35ae

Contents?: true

Size: 601 Bytes

Versions: 6

Compression:

Stored size: 601 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], name: 'attachable_idx'
    add_index :attachments, :position, name: 'attachable_position_idx'
    add_index :attachments, :visible, name: 'attachable_visible_idx'
    add_index :attachments, :locale, name: 'attachable_locale_idx'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
udongo-7.9.0 db/migrate/20180821135446_create_attachments.rb
udongo-7.8.1 db/migrate/20180821135446_create_attachments.rb
udongo-7.8.0 db/migrate/20180821135446_create_attachments.rb
udongo-7.7.2 db/migrate/20180821135446_create_attachments.rb
udongo-7.7.1 db/migrate/20180821135446_create_attachments.rb
udongo-7.7.0 db/migrate/20180821135446_create_attachments.rb