Closed OscarHYCheung closed 4 years ago
I think if no argument is passed to this command then it should undo the seed to match with migrate:undo
Need to change its description hence docs
tag
Docs seem to still be outdated. --help in the cli does not say how to flag the seed file to undo.
What's the proper way to do so? Thanks!
@Taylor123
sequelize db:seed:undo --seed '[seedName]'
(without .js
and the path, just like in the storage)
Be careful, you can "undo" multiple times the seed (it doesn't check the storage)
+1, it needs to match migration stuff. EDIT: and to be documented
Status of this ?
@Taylor123
sequelize db:seed:undo --seed '[seedName]'
(without
.js
and the path, just like in the storage)Be careful, you can "undo" multiple times the seed (it doesn't check the storage)
+1, it needs to match migration stuff. EDIT: and to be documented
Thanks, we have been struggling with this for several hours and could not find anything in docs. This worked for us.
sequelize db:seed:undo
is still not reverting last seed for me :(
Is there a way to merge @empeje PR ?
Hi there, according to the documentation in http://docs.sequelizejs.com/manual/tutorial/migrations.html#undoing-seeds, I should be able to undo the most recent seed with
db:seed:undo
. However, after runningnode_modules/.bin/sequelize db:seed:undo
, the data created by the latest seed are still in the DB.And if I run
node_modules/.bin/sequelize db:seed:undo:all
, it is working fine to undo all seeds.I'm not sure is that related to the warning CLI v3 is not fully compatible to Sequelize v4.
Thanks.
refs sequelize/sequelize#8421
What are you doing?
I would like to undo the last data seed with
What do you expect to happen?
The latest seed should be reverted
What is actually happening?
No data removed, and got the follow output:
Dialect: postgres Dialect version:
pg: 7.3.0, pg-hstore: 2.3.2
Database version:PostgreSQL 9.6.5 on x86_64-apple-darwin16.7.0, compiled by Apple LLVM version 8.1.0 (clang-802.0.42), 64-bit
Sequelize version: 4.13.2 Sequelize CLI version: 3.0.0