Post History
This is the difference between refreshing the database and seeding the database. db:seed does what it says on the tin - seeds the database. That means it adds pre-defined data to the database. It ...
#1: Initial revision
This is the difference between refreshing the database and seeding the database. `db:seed` does what it says on the tin - seeds the database. That means it adds pre-defined data to the database. It doesn't care about what's already there - to the extent that if you don't have appropriate constraints set up, it'll add the same data _every_ time, regardless of if it already exists or not. If you want a _completely_ clear database with only a set of fresh seeds in it, drop the database first: ```bash rails db:drop rails db:create rails db:schema:load rails db:seed ``` If you just have one mistaken seed in there that needs removing, `db:seed` won't do that because that's not what it's meant for - you'll need to remove the erroneous entry manually, either via Rails console or via SQL.