class FixErroneouslySyncedUsersWithEmptyPermissions < Mongoid::Migration
  def self.up
    User.delete_all(:permissions => [], :created_at.gte => Time.zone.parse("27-Nov-2014 10:50"))
  end

  def self.down
  end
end

class FixErroneouslySyncedUsersWithEmptyPermissions < Mongoid::Migration
  def self.up
    User.where(:permissions => [], :created_at.gte => Time.zone.parse("27-Nov-2014 10:50")).delete_all
  end

  def self.down
  end
end

Fix migration written to fix synced users
Fix migration written to fix synced users

The earlier version was incompatible with mongoid,
because it expects keys to be symbols or strings.
