Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

853 tweaked migration to fix db:migrate #875

Merged
merged 1 commit into from
Aug 1, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions db/migrate/20140611142209_move_admin_notes_to_comments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ def self.up
add_column :active_admin_comments, :namespace, :string
add_index :active_admin_comments, [:namespace]
add_index :active_admin_comments, [:author_type, :author_id]

# Update all the existing comments to the default namespace
say "Updating any existing comments to the #{ActiveAdmin.application.default_namespace} namespace."
comments_table_name = ActiveRecord::Migrator.proper_table_name("active_admin_comments")
execute "UPDATE #{comments_table_name} SET namespace='#{ActiveAdmin.application.default_namespace}'"
end

def self.down
Expand Down