mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-11 16:09:39 +00:00
Add a nullable `email` column to the `draft` table and replace the
(workspace_id, path, typ) primary key with a unique index over
(workspace_id, path, typ, COALESCE(email, '')) so each user gets at most
one draft per path while the legacy/NULL bucket stays unique too. The
column is nullable so pre-migration drafts are preserved.
All draft reads/writes are now user-scoped:
- create_draft stamps email = authed.email and upserts per-user
- delete_draft and the deploy-time draft cleanup only touch the
caller's own draft
- get_{script,flow,app}_by_path_with_draft and the list endpoints only
surface the caller's own draft (draft.email = authed.email)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Windmill API
The API server, exposing functionality to other components and the frontend
This crate exposes both a library as well as a binary target.