import { Migration } from "@mikro-orm/migrations";
class Migration20260413102715 extends Migration {
  async up() {
    this.addSql(`alter table "staff_time_project_members" add column "show_in_grid" boolean not null default false;`);
    this.addSql(`
      update "staff_time_project_members" m
      set "show_in_grid" = true
      where exists (
        select 1 from "staff_time_entries" e
        where e."time_project_id" = m."time_project_id"
          and e."staff_member_id" = m."staff_member_id"
          and e."deleted_at" is null
      );
    `);
  }
  async down() {
    this.addSql(`alter table "staff_time_project_members" drop column "show_in_grid";`);
  }
}
export {
  Migration20260413102715
};
//# sourceMappingURL=Migration20260413102715.js.map
