/**
 * @param { import("knex").Knex } knex
 * @returns { Promise<void> }
 */
exports.up = function(knex) {
  return knex.schema.table('projects', function (table) {
    table.boolean('is_active').defaultTo(true).after('pm');
    table.string('project_status').defaultTo('active').after('is_active');
    table.date('completed_date').nullable().after('project_status');
  });
};

/**
 * @param { import("knex").Knex } knex
 * @returns { Promise<void> }
 */
exports.down = function(knex) {
  return knex.schema.table('projects', function (table) {
    table.dropColumn('is_active');
    table.dropColumn('project_status');
    table.dropColumn('completed_date');
  });
};
