Skip to content

Migrations / Seeds Production Ready? #422

Open
@iDVB

Description

@iDVB

I have a rather subjective question regarding Sequelize Cli that I wager others would also like perspectives on.

"Is Sequelize Cli Migrations/Seeds production pipeline ready?"

I have this in my CI/CD pipelines for DEV, STAGE and PROD which get run anytime the application/Docker container get restarted.

      sequelize db:migrate &&
      sequelize db:seed:all &&
      yarn install &&
      yarn start

We currently use this for 2 things:

  • Commit seed files into the project that when run on a brand new startup will populate the DB with dummy data.
  • Commit migration files into the project that essentially give us DB version control and allow us to perform changes to schema when the application is restarted. This would even apply to the live production DB "if restarted", however we would have these scripts run as part of a separate live db update pipe.

Just curious if this is the intended usage for Migrations/seeds. I've never managed this type of DevOps and wonder if it might be a potential hazard to rely on those seed and migration db tables to prevent these scripts from say dropping live table data. Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions