'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.addColumn('builds', 'notification_sent_at', {
      type: Sequelize.DATE,
      allowNull: true,
      comment: 'Timestamp when build_complete notification was sent (prevents duplicates)',
    });

    console.log('Added notification_sent_at column to builds table');
  },

  async down(queryInterface, Sequelize) {
    await queryInterface.removeColumn('builds', 'notification_sent_at');
    console.log('Removed notification_sent_at column from builds table');
  },
};
