1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 1 1 9 18 18 9 5 10 | # Add new migrations here.
# I wasn't able to get automatic path globed `require` to work with gulp.
migrations = [
require "./01_base"
require "./02_add_relations"
]
module.exports =
migrations: migrations
update: (data) ->
for m in migrations
Eif m.update
data = m.update(data)
data
latestVersion: ->
@lastMigration().version
lastMigration: ->
_.max migrations, (m) -> m.version
|