/**
 * @param { import("knex").Knex } knex
 * @returns { Promise<void> }
 */
exports.up = async function(knex) {
  await knex.schema.alterTable('workers', (table) => {
    // 재직 상태 (employed: 재직, resigned: 퇴사)
    table.enum('employment_status', ['employed', 'resigned'])
      .defaultTo('employed')
      .notNullable()
      .comment('재직 상태 (employed: 재직, resigned: 퇴사)');
  });

};

/**
 * @param { import("knex").Knex } knex
 * @returns { Promise<void> }
 */
exports.down = async function(knex) {
  await knex.schema.alterTable('workers', (table) => {
    table.dropColumn('employment_status');
  });

};
