Sha256: 8944c2b4713a6adf32747337a144ed00dccb1b62ccf84fab71fea84516a4af66
Contents?: true
Size: 729 Bytes
Versions: 12
Compression:
Stored size: 729 Bytes
Contents
class AddFileAssetIndexes < ActiveRecord::Migration def self.up unless indexes(:file_assets).collect {|i| i.name}.include?('index_file_assets_on_type') add_index :file_assets, :type end unless indexes(:file_assets).collect {|i| i.name}.include?('file_asset_holder_idx') add_index :file_assets, [:file_asset_holder_id, :file_asset_holder_type], :name => 'file_asset_holder_idx' end unless indexes(:file_assets).collect {|i| i.name}.include?('index_file_assets_on_name') add_index :file_assets, :name end unless indexes(:file_assets).collect {|i| i.name}.include?('index_file_assets_on_directory') add_index :file_assets, :directory end end def self.down end end
Version data entries
12 entries across 12 versions & 1 rubygems