Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-1593

rake db:mongoid:create_indexes never fails

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.4.1
    • Affects Version/s: None
    • Component/s: None

      If any model have an invalid index specification, the db:mongoid:create_indexes task should fail, but it never does.

      $ rake db:mongoid:create_indexes; echo $?
      ERROR: Invalid index field nil; should be one of Mongo::ASCENDING (1), Mongo::DESCENDING (-1) or Mongo::GEO2D ('2d').
      0
      

      When this task is used as a part of a migration, the migration does not cancel and the error just disappears. Failing rake tasks should fail with a non-zero exit code and cancel all following tasks from executing.

            Assignee:
            durran Durran Jordan
            Reporter:
            mange Magnus Bergmark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: