⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
import { readFileSync } from "node:fs";
import { describe, expect, it } from "vite-plus/test";
const migrationPath = new URL(
"../../../apps/api/drizzle/0029_fk_supporting_indexes.sql",
import.meta.url,
);
const migrationSql = readFileSync(migrationPath, "utf8");
describe("0029_fk_supporting_indexes migration", () => {
it("uses direct NOT NULL column adds instead of split backfill steps", () => {
expect(migrationSql).toContain(
'ALTER TABLE "notification" ADD COLUMN "updated_at" timestamp with time zone DEFAULT now() NOT NULL;',
);
expect(migrationSql).toContain(
'ALTER TABLE "time_entry" ADD COLUMN "updated_at" timestamp DEFAULT now() NOT NULL;',
);
expect(migrationSql).not.toContain('UPDATE "notification"');
expect(migrationSql).not.toContain('UPDATE "time_entry"');
expect(migrationSql).not.toContain('ALTER COLUMN "updated_at"');
});
it("creates expected FK-supporting indexes in migration", () => {
const indexNames = [
"activity_userId_idx",
"asset_createdBy_idx",
"invitation_inviterId_idx",
"notification_userId_idx",
"task_assigneeId_idx",
"task_columnId_idx",
"time_entry_taskId_idx",
"time_entry_userId_idx",
"user_notification_workspace_project_workspaceId_projectId_idx",
"unwp_workspaceId_workspaceRuleId_idx",
"workflow_rule_columnId_idx",
];
for (const indexName of indexNames) {
expect(migrationSql).toContain(`CREATE INDEX "${indexName}"`);
}
expect(migrationSql.match(/CREATE INDEX /g)).toHaveLength(
indexNames.length,
);
expect(migrationSql).not.toContain("CONCURRENTLY");
});
});