Part of #1127.
Scope
Add a slug column to the workflow table so workflows are addressable by a human-readable identifier instead of UUID. Workspace-scoped uniqueness.
Changes
packages/db/src/schema/workflow.ts: add slug: text("slug").notNull() and a unique index on (workspace_id, slug).
- Generate Drizzle migration, then hand-edit for backwards compatibility:
- Add
slug as nullable.
- Backfill from
name in psql using the same slugify rules the app code will use (lowercase, spaces → -, strip URL-unsafe chars).
- Set
notNull + add unique index.
- Pre-flight check: confirm no two existing workflow names slugify to the same value within a workspace before running the migration in prod.
Out of scope
API/UI/SDK changes — covered in sibling issues.
Part of #1127.
Scope
Add a
slugcolumn to theworkflowtable so workflows are addressable by a human-readable identifier instead of UUID. Workspace-scoped uniqueness.Changes
packages/db/src/schema/workflow.ts: addslug: text("slug").notNull()and a unique index on(workspace_id, slug).slugas nullable.namein psql using the same slugify rules the app code will use (lowercase, spaces →-, strip URL-unsafe chars).notNull+ add unique index.Out of scope
API/UI/SDK changes — covered in sibling issues.