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
If you name the migration you want to migrate up to, but it doesn't exist, migrate up foo will migrate all the way up:
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~$ mkdir migrate-project
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~$ cd migrate-project/
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~/migrate-project$ npm i migrate
npm WARN saveError ENOENT: no such file or directory, open '/home/hdon/migrate-project/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/hdon/migrate-project/package.json'
npm WARN migrate-project No description
npm WARN migrate-project No repository field.
npm WARN migrate-project No README data
npm WARN migrate-project No license field.
+ migrate@1.6.2
added 20 packages from 13 contributors and audited 21 packages in 0.884s
found 0 vulnerabilities
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~/migrate-project$ ./node_modules/.bin/migrate init
migrations dir : /home/hdon/migrate-project/migrations
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~/migrate-project$ ./node_modules/.bin/migrate create a
create : /home/hdon/migrate-project/migrations/1558410539360-a.js
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~/migrate-project$ ./node_modules/.bin/migrate create a
create : /home/hdon/migrate-project/migrations/1558410540833-a.js
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~/migrate-project$ ./node_modules/.bin/migrate create a
create : /home/hdon/migrate-project/migrations/1558410546618-a.js
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~/migrate-project$ ./node_modules/.bin/migrate up b
up : 1558410539360-a.js
up : 1558410540833-a.js
up : 1558410546618-a.js
migration : complete
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~/migrate-project$ node --version
v12.0.0
hdon@ubuntu-s-1vcpu-1gb-sfo2-01:~/migrate-project$ npm --version
6.9.0
The text was updated successfully, but these errors were encountered:
Interesting, yes it would migrate all the way up. I am not sure what I would expect it to do, but probably not that. First off I feel like it should error an exit, but I would want to think on it a little before we make any decision. If you open a PR to change this behavior it would give a good start to the conversation.
If you name the migration you want to migrate up to, but it doesn't exist,
migrate up foo
will migrate all the way up:The text was updated successfully, but these errors were encountered: