Skip to content

db:seed show successful migration but do not upload anything in SQLite  #434

@abuzarhamza

Description

@abuzarhamza

I am trying to insert the dummy data using sequelize-cli command

sequelize db:seed --seed seeders/20170212081140-subject_tags.js

here is my config file

{
  "development": {
    "username": "root",
    "password": null,
    "database": "database_development",
    "host": "127.0.0.1",
    "dialect": "sqlite",
    "seederStorage": "sequelize",
    "storage": "./test"
  }
}

and here my seeder file

use strict';

module.exports = {
  up: function(queryInterface, Sequelize) {

    return 
      queryInterface.bulkUpdate('subject_tags', [

      {
        tag: 'agricultural-sciences',
        tag_description: '',
        subject_category: 'biological_&_medical_sciences',
        createdAt: new Date(),
        updatedAt: new Date()
      }, {
        tag: 'biochemistry',
        tag_description: '',
        subject_category: 'biological_&_medical_sciences',
        createdAt: new Date(),
        updatedAt: new Date()
      }, {
        tag: 'bioinformatics',
        tag_description: '',
        subject_category: 'biological_&_medical_sciences',
        createdAt: new Date(),
        updatedAt: new Date()
      }
    ] , {});
  },

  down: function(queryInterface, Sequelize) {
     return 
      queryInterface.bulkDelete('subject_tags', null, {});

  }
}; 

Though I am getting the status

Using environment "development".
== 20170212081140-subject_tags: migrating =======
== 20170212081140-subject_tags: migrated (0.053s)

I tried bulkCreate and bulkInsert in the seed file , all of them run successful, but data does not get inserted into the table the data does not get inserted. Is I am doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions