mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 16:02:36 +00:00
Revoking the sequence grant would strip a privilege a healthy instance had before this migration ran — the grant it adds is indistinguishable in the catalog from the one ALTER DEFAULT PRIVILEGES gives at creation time — so the down is a comment, matching the other grant-only migrations. The mirror rewrite is spread over three sites that have to agree and fails silently when they don't, so it gets a test: a draft carrying both path keys has both moved, and one carrying neither mirror does not gain one. It reads the value back over HTTP rather than with `sqlx::query!`, which would need an offline cache entry of its own. Also drops twelve `.sqlx` entries this branch added and then superseded, and corrects the doc and openapi text that still described only the typed path being rewritten. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
17 lines
838 B
SQL
17 lines
838 B
SQL
-- Fixture for the two-path-key move test.
|
|
--
|
|
-- Two draft-only scripts owned by test-user, both parked at a generated storage
|
|
-- key the way a session-created draft is. One carries the `draft_path` mirror the
|
|
-- session editor writes while the typed path differs from that key; the other
|
|
-- carries no mirror at all, which is what a plain draft looks like.
|
|
|
|
INSERT INTO draft (workspace_id, path, typ, value, email) VALUES
|
|
('test-workspace', 'u/test-user/draft_mirror', 'script',
|
|
'{"path": "u/test-user/friendly", "draft_path": "u/test-user/friendly",
|
|
"content": "x", "language": "bun", "summary": "S"}',
|
|
'test@windmill.dev'),
|
|
('test-workspace', 'u/test-user/draft_plain', 'script',
|
|
'{"path": "u/test-user/draft_plain",
|
|
"content": "x", "language": "bun", "summary": "S"}',
|
|
'test@windmill.dev');
|