diff --git a/server/seeders/20200204185532-rules.js b/server/seeders/20200204185532-rules.js index e34073532..bdf08c005 100644 --- a/server/seeders/20200204185532-rules.js +++ b/server/seeders/20200204185532-rules.js @@ -1,38 +1,47 @@ -'use strict'; -const { v4: uuidv4 } = require('uuid'); +"use strict"; +const { v4: uuidv4 } = require("uuid"); module.exports = { up: (queryInterface, Sequelize) => { - - return queryInterface.bulkInsert('rules', [{ - id: uuidv4(), - name : 'Date Validate', - createdAt : new Date(), - updatedAt : new Date() - },{ - id: uuidv4(), - name : 'Phone Validate', - createdAt : new Date(), - updatedAt : new Date() - },{ - id: uuidv4(), - name : 'Integer Validate', - createdAt : new Date(), - updatedAt : new Date() - },{ - id: uuidv4(), - name : 'Not Empty', - createdAt : new Date(), - updatedAt : new Date() - },{ - id: uuidv4(), - name : 'Assert', - createdAt : new Date(), - updatedAt : new Date() - }], {}); - + return queryInterface.bulkInsert( + "rules", + [ + { + id: uuidv4(), + name: "Date Validate", + createdAt: new Date(), + updatedAt: new Date(), + }, + { + id: uuidv4(), + name: "Phone Validate", + createdAt: new Date(), + updatedAt: new Date(), + }, + { + id: uuidv4(), + name: "Integer Validate", + createdAt: new Date(), + updatedAt: new Date(), + }, + { + id: uuidv4(), + name: "Not Empty", + createdAt: new Date(), + updatedAt: new Date(), + }, + { + id: uuidv4(), + name: "Assert", + createdAt: new Date(), + updatedAt: new Date(), + }, + ], + {} + ); }, - down: (queryInterface, Sequelize) => { - } + down: async (queryInterface, Sequelize) => { + return queryInterface.bulkDelete("rules", null, {}); + }, }; diff --git a/server/seeders/20220818180347-constraints.js b/server/seeders/20220818180347-constraints.js index a2075c007..aaa75edb9 100644 --- a/server/seeders/20220818180347-constraints.js +++ b/server/seeders/20220818180347-constraints.js @@ -43,5 +43,7 @@ module.exports = { ); }, - down: (queryInterface, Sequelize) => {}, + down: async (queryInterface, Sequelize) => { + return queryInterface.bulkDelete("constraint", null, {}); + }, };