Connexions/cnx-upgrade — pull request #39 by karenc (2013-12-14 00:40:34+00:00)
Title: Fix collection minor version script for some invalid data in db

Some modules in some collection trees are newer than the collections
themselves in the database. We probably won't have this in the future
but the script needs to deal with it. The script doesn't create minor
versions in those cases.

Example:

col10233 was "revised" at 2004-06-24 08:12:24.875-05.

In the collection tree are m12050, m12049, m12048, m12047.

The "revised" column for these modules are:
```
moduleid | version | revised
----------+---------+-------------------------------
m12047 | 1.1 | 2004-06-24 17:10:47.545195-05
m12048 | 1.1 | 2004-06-24 17:12:03.076229-05
m12049 | 1.1 | 2004-06-24 17:52:13.317586-05
m12050 | 1.1 | 2004-06-24 18:10:23.192922-05
```

The modules were published after the collection was published.