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

Version Path
erp_tech_svcs-3.0.12 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.11 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.10 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.9 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.8 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.7 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.6 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.5 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.4 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.3 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.2 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb
erp_tech_svcs-3.0.1 db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb