db-migrate/node-db-migrate

No order is guaranteed if migrations have the same date

Open

#646 ouverte le 28 août 2019

Voir sur GitHub
 (6 commentaires) (0 réactions) (0 assignés)JavaScript (367 forks)batch import
bugfeaturegood first issuehelp wanted

Métriques du dépôt

Stars
 (2 296 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

I'm submitting a...

  • Bug report
  • Feature request
  • Question

Current behavior

Migrations on the same date (i.e. same year, month, day, hour, minute and second) aren't applied with any discernible criteria:

image

Expected behavior

I would expect the alphabetical order to be respected.

Minimal reproduction of the problem with instructions

create a bunch of migrations (if you have a machine fast enough to create multiple migrations on the same second, otherwise simply rename them)

for i in `seq 1 100`; do npx db_migrate create x$i --sql-file --env dev; done

apply them:

npx db_migrate up --env dev

watch them be in a randomish order

What is the motivation / use case for changing the behavior?

Avoid the confusion of users and breakage when auto-generating migrations

Environment


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Guide contributeur