Sha256: 09313ed0c5e9f42d776d65f19057544ccb1ebc80a4f4e5f092eb1b32cd78f7f2

Contents?: true

Size: 476 Bytes

Versions: 22

Compression:

Stored size: 476 Bytes

Contents

# -*- encoding : utf-8 -*-
class AddUserTypesToBookmarksSearches < ActiveRecord::Migration
  def self.up
    add_column :searches, :user_type, :string
    add_column :bookmarks, :user_type, :string
    Search.reset_column_information
    Bookmark.reset_column_information
    Search.update_all("user_type = 'user'")
    Bookmark.update_all("user_type = 'user'")
  end

  def self.down
    remove_column :searches, :user_type
    remove_column :bookmarks, :user_type
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
curate-0.6.6 spec/internal/db/migrate/20140328183261_add_user_types_to_bookmarks_searches.rb
curate-0.6.4 spec/internal/db/migrate/20140131175504_add_user_types_to_bookmarks_searches.rb
curate-0.6.3 spec/internal/db/migrate/20131205204130_add_user_types_to_bookmarks_searches.rb
curate-0.6.1 spec/internal/db/migrate/20131203200431_add_user_types_to_bookmarks_searches.rb
curate-0.6.0 spec/internal/db/migrate/20131126132862_add_user_types_to_bookmarks_searches.rb
curate-0.5.6 spec/internal/db/migrate/20131114003108_add_user_types_to_bookmarks_searches.rb
curate-0.5.5 spec/internal/db/migrate/20131114003108_add_user_types_to_bookmarks_searches.rb
curate-0.5.4 spec/internal/db/migrate/20131111192759_add_user_types_to_bookmarks_searches.rb
curate-0.5.2 spec/internal/db/migrate/20131106182745_add_user_types_to_bookmarks_searches.rb
curate-0.5.1 spec/internal/db/migrate/20131028141208_add_user_types_to_bookmarks_searches.rb
curate-0.5.0 spec/internal/db/migrate/20131018143663_add_user_types_to_bookmarks_searches.rb
hydra_mediated-0.0.1 db/migrate/20130606160539_add_user_types_to_bookmarks_searches.rb
hydra-editor-0.0.5 spec/dummy/db/migrate/20130618142858_add_user_types_to_bookmarks_searches.rb
hydra-editor-0.0.4 spec/dummy/db/migrate/20130618142858_add_user_types_to_bookmarks_searches.rb
curate-0.3.2 spec/dummy/db/migrate/20130417124661_add_user_types_to_bookmarks_searches.rb
hydra-editor-0.0.3 spec/dummy/db/migrate/20130618142858_add_user_types_to_bookmarks_searches.rb
hydra-editor-0.0.2 spec/dummy/db/migrate/20130415215636_add_user_types_to_bookmarks_searches.rb
hydra-editor-0.0.1 spec/dummy/db/migrate/20130415215636_add_user_types_to_bookmarks_searches.rb
curate-0.3.1 spec/dummy/db/migrate/20130417124661_add_user_types_to_bookmarks_searches.rb
curate-0.2.0 spec/dummy/db/migrate/20130417124661_add_user_types_to_bookmarks_searches.rb