Sha256: 26543b5c790635d8cec57c0415d9371f897372fc6bf6380af615f194940e510e

Contents?: true

Size: 556 Bytes

Versions: 14

Compression:

Stored size: 556 Bytes

Contents

class StoreIdForTaxonomies < ActiveRecord::Migration
  def self.up
    if table_exists?('taxonomies')
      add_column :taxonomies, :store_id, :integer
      add_index :taxonomies, :store_id
    elsif table_exists?('spree_taxonomies')
      add_column :spree_taxonomies, :store_id, :integer
      add_index :spree_taxonomies, :store_id
    end
  end

  def self.down
    if table_exists?('taxonomies')
      remove_column :taxonomies, :store_id
    elsif table_exists?('spree_taxonomies')
      remove_column :spree_taxonomies, :store_id
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
solidus_multi_domain-1.5.0 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.4.3 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.4.2 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.4.1 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.4.0 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.3.0 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.2.0 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.1.3 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.1.2 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.1.1 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.0.3 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.1.0 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.0.1 db/migrate/20100616204303_store_id_for_taxonomies.rb
solidus_multi_domain-1.0.0 db/migrate/20100616204303_store_id_for_taxonomies.rb