I've been struggling with this for almost an entire day. The TL;DR is that all of the db:seed commands will execute and not throw an error when they don't actually do anything. I've been pulling my hair out trying to figure out what the hell is going on but since there's no real documentation, it's been extremely tough.
None of the seed commands ever work. Not seed --seed, not seed:undo, not seed:all (no seeds! great!), not seed:undo:all (again there are no seeds! wat). I switched to the json seeder cache and have been manually modifying it because even though the seed doesn't do anything it gets marked as complete.
Seeders that don't execute should not be marked as a success. And I know it didn't execute because I have no data in my database (I had to remove it all manually because again undo doesn't work).
'use strict';
module.exports = {
up: function (queryInterface, Sequelize) {
return
queryInterface.bulkInsert('Users', [
{email: "aphrodite@olympus.org", name: "Aphrodite", createdAt: Date.now(), updatedAt: Date.now() },
{email: "athena@olympus.org", name: "Athena", createdAt: Date.now(), updatedAt: Date.now() },
{email: "zeus@olympus.org", name: "Zeus", createdAt: Date.now(), updatedAt: Date.now() },
{email: "apollo@olympus.org", name: "Apollo", createdAt: Date.now(), updatedAt: Date.now() }
]
);
},
down: function (queryInterface, Sequelize) {
return
queryInterface.bulkDelete('Users', null, {});
}
};
I do not have a schema. I've tried wrapping the returned queryInterface in an array as some Stack Overflow posts have suggested, nothing. I've tried {tableName: 'Users'} and nothing. I've tried an empty string schema, also nothing. I've added a {schema: 'whatever'} after the data array, nothing. I added an empty hash after the data array, nothing. So something is going on but it's just not executing my inserts or deletes, and it's not telling me there's an error. Silence is the absolute worst thing.
This is with Sequelize 3.23.0, CLI 2.4.0
I've been struggling with this for almost an entire day. The TL;DR is that all of the
db:seedcommands will execute and not throw an error when they don't actually do anything. I've been pulling my hair out trying to figure out what the hell is going on but since there's no real documentation, it's been extremely tough.None of the seed commands ever work. Not
seed --seed, notseed:undo, notseed:all(no seeds! great!), notseed:undo:all(again there are no seeds! wat). I switched to the json seeder cache and have been manually modifying it because even though the seed doesn't do anything it gets marked as complete.Seeders that don't execute should not be marked as a success. And I know it didn't execute because I have no data in my database (I had to remove it all manually because again
undodoesn't work).I do not have a schema. I've tried wrapping the returned
queryInterfacein an array as some Stack Overflow posts have suggested, nothing. I've tried{tableName: 'Users'}and nothing. I've tried an empty string schema, also nothing. I've added a{schema: 'whatever'}after the data array, nothing. I added an empty hash after the data array, nothing. So something is going on but it's just not executing my inserts or deletes, and it's not telling me there's an error. Silence is the absolute worst thing.This is with Sequelize 3.23.0, CLI 2.4.0