Sha256: 56bc6fb2ebbb4baa2832a45508d252154b7e72425d3a918da079a5cd80d5fc4c

Contents?: true

Size: 968 Bytes

Versions: 22

Compression:

Stored size: 968 Bytes

Contents

# encoding: UTF-8

# Copyright 2011 innoQ Deutschland GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

class AddTypeToCollectionContents < ActiveRecord::Migration
  def self.up
    rename_column :collection_members, :concept_id, :target_id
    add_column :collection_members, :type, :string
    Collection::Member::Base.update_all(:type => 'Collection::Member::Concept')
    Collection::Base.update_all(:type => 'Collection::Base')
  end

  def self.down
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
iqvoc-3.2.11 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.2.10 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.2.9 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.2.8 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.5.6 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.5.5 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.5.4 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.2.7 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.5.3 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.5.2 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.5.1 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.5.0 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.4.0 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.3.4 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.3.3 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.3.2 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.3.1 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.3.0 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.2.6 db/migrate/20101208103531_add_type_to_collection_contents.rb
iqvoc-3.2.5 db/migrate/20101208103531_add_type_to_collection_contents.rb