Skip to content

can't run seeder #322

Description

@G3z

i'm trying to run this simple seeder

'use strict';

module.exports = {
    up(queryInterface) {
        return queryInterface.bulkInsert('Users',
            [{
                username: 'aaaa',
                password: 'qweqwe',
                email: '##',
                profile: {
                    name: 'aaa',
                    surname: 'bbb',
                },
                createdAt: Date.now(),
                updatedAt: Date.now(),
            }, {
                username: 'ccc',
                password: 'qweqwe',
                email: '##',
                profile: {
                    name: 'ddd',
                    surname: 'eee',
                },
                createdAt: Date.now(),
                updatedAt: Date.now(),
            }]
        );
    },

    down(queryInterface) {
        return queryInterface.bulkDelete('Users', null, {});
    },
};
⇒ sequelize db:seed:all

Sequelize [Node: 6.3.0, CLI: 2.4.0, ORM: 3.23.3, pg: ^6.0.1]

(node:31807) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Loaded configuration file "config/config.json".
Using environment "development".
== 20160711203859-users-seeder: migrating =======
Seed file failed with error: val.replace is not a function

i tried to debug but couldn't follow track down the call.
what am i doing wrong ?

also i use this return queryInterface.bulkInsert('Users', [{}]); as up()

this is the result

⇒ sequelize db:seed:all

Sequelize [Node: 6.3.0, CLI: 2.4.0, ORM: 3.23.3, pg: ^6.0.1]

(node:32089) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Loaded configuration file "config/config.json".
Using environment "development".
== 20160711203859-users-seeder: migrating =======
Seed file failed with error: syntax error at or near ")"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions