Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Session migrations should be encapsulated and cleaned up #10488

Closed
bsclifton opened this issue Aug 15, 2017 · 0 comments
Closed

Session migrations should be encapsulated and cleaned up #10488

bsclifton opened this issue Aug 15, 2017 · 0 comments

Comments

@bsclifton
Copy link
Member

See comments at
#10181 (comment)

Not that we have to do it now... but I'm Curious what you think @diracdeltas and @darkdh

Similar to Ruby and Python, maybe we could create a /migrations/ folder and have a single file (ex: 0-20-0_1st_3rd_fingerprint) with a two possible functions (postMigrate, preMigrate) for each type of migration that we'd like to run.

We could then call them like so:

module.exports.runPostMigrations = (data) => {
 migrations = [
   require('../migrations/0-12-0_search_xml'),
   require('../migrations/0-14-0_autofill_data'),
   require('../migrations/0-20-0_1st_3rd_fingerprint')
 ]
 migrations.runPostMigrations()
}

cc: @diracdeltas @NejcZdovc @darkdh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant