class AddSlugToPeople < ActiveRecord::Migration
  def change
    add_column :people, :slug, :string
    add_index :people, :slug, unique: true
    Person.observers.disable :all do
      Person.all.each do |p|
        class << p
          def privy_counsellor?
            false
          end
        end
        # Resaving each person generates a slug
        p.save
      end
    end
  end
end

class AddSlugToPeople < ActiveRecord::Migration
  class Person < ActiveRecord::Base
  end

  def change
    add_column :people, :slug, :string
    add_index :people, :slug, unique: true
    Person.observers.disable :all do
      Person.all.each do |p|
        class << p
          def privy_counsellor?
            false
          end
        end
        # Resaving each person generates a slug
        p.save
      end
    end
  end
end

Fix migration so that it runs in the presence of translations
Fix migration so that it runs in the presence of translations

Without this change, running this migration against the most recent code
results in the following error:

    Mysql2::Error: Table 'whitehall_development.person_translations' doesn't
exist
