20260312064956-clients.js 693 B

12345678910111213141516171819202122232425262728293031323334
  1. 'use strict';
  2. const md5 = require('md5');
  3. /** @type {import('sequelize-cli').Migration} */
  4. module.exports = {
  5. async up (queryInterface, Sequelize) {
  6. await queryInterface.bulkUpdate('clients',
  7. {
  8. login: 'ivan_ivanov',
  9. password: md5('ivan_password_2026')
  10. },
  11. { client_id: 1 }
  12. );
  13. await queryInterface.bulkUpdate('clients',
  14. {
  15. login: 'maria_petrova',
  16. password: md5('maria_secure_99')
  17. },
  18. { client_id: 2 }
  19. );
  20. },
  21. async down (queryInterface, Sequelize) {
  22. await queryInterface.bulkUpdate('clients',
  23. {
  24. login: null,
  25. password: null
  26. },
  27. { client_id: [1, 2] }
  28. );
  29. }
  30. };