pub async fn create(
pool: &PgPool,
actor: &Actor,
input: ChangeInput,
) -> AppResult<Change>Expand description
Creates a draft change.
ยงInvariants
- Permission: CAD editor.
- Locks: the
changecounter row, held until commit, so concurrent creations get different numbers. - Audit:
change.create. - Notifications / webhooks: none.
- Atomic: one transaction; the number is stepped in it and is not used up when it fails.