yangzhang75 opened a new pull request, #7851:
URL: https://github.com/apache/texera/pull/7851
Part of #7828.
A public workflow follows the author's live content today: every save
reaches the Hub
immediately. Pinning a version as the public copy needs somewhere to keep
that copy, which
is what these columns are. Nothing writes them yet — this is the schema
alone.
### What lands
- **Four columns on `workflow`** — `published_version_id`,
`published_content`,
`published_name`, `published_description`. `is_public` stays the on/off
switch;
`published_content` is the pin, and NULL means the workflow follows the
author's latest,
which is what every workflow does today. **No backfill**, so deploying
this changes
nothing anyone can see.
- **A CHECK constraint** — `published_content IS NULL OR is_public`. A pin
only means
something while the workflow is public, so the other case is
unrepresentable rather than
guarded against: unpublishing will have to clear the copy.
- **A PGroonga index** over the pinned name/description/content, mirroring
the
latest-content index, so public search can match a pinned workflow against
its frozen
copy. The expression matches the one the query builder will produce.
- **Three call sites updated** — adding columns widens the jOOQ-generated
positional
constructor from 7 parameters to 11, so clone, duplicate and
restore-a-version build their
POJO with setters instead.
### Testing
`PublishedCopySchemaSpec` covers what the migration alone guarantees: the
columns land NULL
so every workflow keeps following the author's latest, a public workflow may
carry a frozen
copy, and a private one is refused by the database. `WorkflowResourceSpec`
and
`WorkflowVersionResourceSpec` cover the three rewritten call sites — clone,
duplicate and
restore-a-version still produce a private copy with new operator ids.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]