Skip to main content

0024 · Project names fit the provisioning contract

Memory namespace · version 24 · source

The CLI/provisioner accepts the same ASCII grammar and byte limit. Validate existing rows atomically; do not silently truncate or rename a project that credentials already reference.

What it runs

  • ALTER TABLE project DROP CONSTRAINT project_scope_chk
  • ALTER TABLE project ADD CONSTRAINT project_scope_chk CHECK

SQL

{schema} is replaced with the validated namespace name when the migration is applied.

7 lines
-- Copyright 2026 The Taisce Authors
-- SPDX-License-Identifier: Apache-2.0
-- The CLI/provisioner accepts the same ASCII grammar and byte limit. Validate existing rows
-- atomically; do not silently truncate or rename a project that credentials already reference.
ALTER TABLE {schema}.project DROP CONSTRAINT project_scope_chk;
ALTER TABLE {schema}.project ADD CONSTRAINT project_scope_chk
CHECK (scope ~ '^[a-z][a-z0-9_]{0,62}$');