Skip to content

Migrations mismatch with pre-populated database in getting started tutorial #60

@devinivy

Description

@devinivy

The pre-populated database provided for learning/convenience creates a difficult snag when used in the context of the getting started tutorial: because the migrations tracked in the db by knex wont match the names of the migrations created during the getting started tutorial, knex will believe the migrations directory is corrupted. For example, upon server start:

> PATH_TO_DATABASE=riddles.db node server
[exiting] Fatal exception: Error: The migration directory is corrupt, the following files are missing: 20180420011654_add-riddles.js

I believe one of the main reasons to advertise the pre-populated db was to make it simple to have some persisted riddles without needing to create and re-create them across server starts while playing with the tutorial, so hopefully our solution will cater to this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions