Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DiegoPinho/7206da08e64fe31a145a23e04790b48a to your computer and use it in GitHub Desktop.
Save DiegoPinho/7206da08e64fe31a145a23e04790b48a to your computer and use it in GitHub Desktop.
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.bulkInsert(
"localidade",
[
{
nome_localidade: "Localidade 10",
created_at: new Date(),
updated_at: new Date(),
},
{
nome_localidade: "Localidade 5",
created_at: new Date(),
updated_at: new Date(),
},
{
nome_localidade: "Localidade 6",
created_at: new Date(),
updated_at: new Date(),
},
],
{}
);
},
async down(queryInterface, Sequelize) {
await queryInterface.bulkDelete("localidade", null, {});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment