20250514134719-menu-items.js 571 B

12345678910111213141516
  1. 'use strict';
  2. /** @type {import('sequelize-cli').Migration} */
  3. module.exports = {
  4. async up (queryInterface, Sequelize) {
  5. await queryInterface.bulkInsert('MenuItem', [
  6. {id: 1, title: 'Салат', image: 'Салат.jpg', price: 100},
  7. {id: 2, title: 'Суп', image: 'Суп.jpg', price: 100},
  8. {id: 3, title: 'Компот', image: 'Компот.jpg', price: 100}
  9. ])
  10. },
  11. async down (queryInterface, Sequelize) {
  12. await queryInterface.bulkDelete('MenuItem', null /* тут можно прописать условие WHERE */)
  13. }
  14. }