You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
Create two migrations in 2 files, but with the same class name.
There are two scenarios:
You run one migration and then another in 2 steps. Then the second migration is skipped, because its class name is already present in the migrations table.
You run both migrations in one step. This time both migrations are executed
Thus we have different behavior. This creates a problem when you make an error copy-pasting migrations and not changing class name, and the first migration is already applied. When you run tests that run all migrations at once all the migrations will be executed despite duplicate class name. When you apply it on live database, the second migration will be skipped.
The text was updated successfully, but these errors were encountered:
jurasan
pushed a commit
to jurasan/typeorm
that referenced
this issue
Sep 6, 2019
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Steps to reproduce or a small repository showing the problem:
Create two migrations in 2 files, but with the same class name.
There are two scenarios:
Thus we have different behavior. This creates a problem when you make an error copy-pasting migrations and not changing class name, and the first migration is already applied. When you run tests that run all migrations at once all the migrations will be executed despite duplicate class name. When you apply it on live database, the second migration will be skipped.
The text was updated successfully, but these errors were encountered: