Q:

sequilze REACTJS

$ npm install --save sequelize
0
sequelize seed:create --name my-seed-file
0
psql ideaSELECT * FROM "Ideas";SELECT * FROM "Contents";
0
sequelize db:seed:all
0
'use strict';module.exports = {  up: (queryInterface, Sequelize) => {    return queryInterface.bulkInsert('Contents', [{      idea_id : 1,      post : 'Great lyrics',      audio : 'sounds',      createdAt : new Date(),      updatedAt : new Date()    }], {});  },down: (queryInterface, Sequelize) => {    queryInterface.bulkDelete('Contents', [{      post :'Great lyrics'    }])  }};
0
'use strict';module.exports = {  up: (queryInterface, Sequelize) => {    return queryInterface.bulkInsert('Ideas', [{      subject : 'First song',      category : 'Music',      createdAt : new Date(),      updatedAt : new Date()    }], {});  },down: (queryInterface, Sequelize) => {    queryInterface.bulkDelete('Ideas', [{      subject :'First song'    }])  }};
0

New to Communities?

Join the community