Skip to content

Mongoid3 Cleaner can not remove a collection that contains the "system" in name. #6

@sakomoko

Description

@sakomoko

Mongoid3 Cleaner can not remove a collection that contains the "system" in name.
collection name e.g. user_systems, system_settings

Cause
Moped::Truncation.collections

      def collections
        session['system.namespaces'].find(:name => { '$not' => /system|\$/ }).to_a.map do |collection|
          _, name = collection['name'].split('.', 2)
          name
        end
      end

I think. To fix this, change the RegExp.

e.g.
/^system\./

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions