Skip to content

How are we handling DB migration? #337

Closed
@Zren

Description

@Zren

@sizzlemctwizzle & whoever else has access to the production db.

This came up in #335. How do you want me to handle migration?

Personally, I'd prefer having a ./models/migration/ folder, with scripts called 2014-08-28.js which would connect with mongoose normally, but run operations. They'd accept the CONNECT_URI env var. These would have to be run by someone with access to the db however.

Another option would be to version our schema, then run scripts automatically on server run. This'd be a pain to implement as we'd have to write an entire migration feature ourselves unless someone knows one.

Thirdly, we could lazily migrate (which is how you normally handle schemaless databases) in which each document will be updated as it's updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    team bizThis is similar to a meta discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions