Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

701 B
Raw Blame
import { addColumnIfMissing } from '../migration-utils';
import { Migration } from '@mikro-orm/migrations';

/**
 * Legacy migration step 182 (`db/migrations.ts`).
 *
 * Comp/Flex days (#1074): a vacay entry is either a vacation day (counts toward
 * the entitlement) or a comp/flex day (kind='comp', costs 0 — flextime/overtime
 * offset). Orthogonal to fraction, so a half comp day is kind='comp' + fraction=0.5.
 */
export class Migration20200101030200_comp_flex_days extends Migration {
  override name = 'Migration20200101030200_comp_flex_days';

  override async up(): Promise<void> {
    await addColumnIfMissing(this, 'vacay_entries', 'kind', `kind TEXT NOT NULL DEFAULT 'vacation'`);
  }
}