Giter VIP home page Giter VIP logo

Comments (3)

dhui avatar dhui commented on May 18, 2024 1

You'll need to determine how and when you want to run migrations since that affects how you use the tool.

Personally, my workflow looks like this:

  1. Create migrations using the CLI create command. This ensures that the name of the migration is compatible w/ migrate. Note, I'm using file sources for my migrations and package everything into a docker image for my API servers.
  2. Use the CLI to test the up/down migration on a test DB instance. The force command is handy for "fixing" borked migrations.
  3. Ship the API server docker image. The API server (go binary) is responsible for running migrations (up only) when starting. I rely on the db lock to prevent contention between migrations and manage migrations manually using the CLI if necessary.

from migrate.

dhui avatar dhui commented on May 18, 2024 1

Correct, the table used to track the currently applied migration is created by migrate, specifically, by the db driver.

from migrate.

kaaquist avatar kaaquist commented on May 18, 2024

Thanks for your comments. I assume that the cli will create the version table on first run? Because that is what I don't get 😀 .. Do I create it my self or does the migrate app do that?

from migrate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.