'use strict'; /** @type {import('sequelize-cli').Migration} */ module.exports = { async up (queryInterface, Sequelize) { await queryInterface.createTable('photographers', { photographer_id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.DataTypes.INTEGER }, full_name: { type: Sequelize.DataTypes.STRING(100), allowNull: false, comment: 'ФИО фотографа' }, specialization: { type: Sequelize.DataTypes.STRING(50), allowNull: true, comment: 'Специализация' }, phone_number: { type: Sequelize.DataTypes.STRING(20), allowNull: true, comment: 'Номер телефона' }, rating: { type: Sequelize.DataTypes.DECIMAL(3, 2), allowNull: true, defaultValue: 0.00, comment: 'Рейтинг' }, is_available: { type: Sequelize.DataTypes.BOOLEAN, allowNull: true, defaultValue: true, comment: 'Доступен ли фотограф' } }) }, async down (queryInterface, Sequelize) { await queryInterface.dropTable('photographers') } }