tsapi-seriesdb-shared-sql/sql/10_schema_version.sql
peter 4c067bc4b9 Schema 1.2.0: meta.series_schemas registry; lower-case name checks
- meta.series_schemas (name, description, created_at, created_by), seeded
  with 'series'. FK series_db_schema_fkey from meta.series.db_schema: a
  series may only live in a registered schema, for every client.
  Unregistered schemas belong to the user and are never touched.
- CHECK series_schemas_name_check and series_table_name_check enforce the
  shared lower-case identifier rule in the database.
- meta.find_schema_problems() covers the registry and reports a registered
  schema that no longer exists; user schemas are not examined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 11:42:10 +01:00

8 lines
525 B
SQL

-- ============================================================================
-- Schema version row -- runs last, so a database that has it is complete.
-- ============================================================================
-- Keep this string equal to ../VERSION. Clients compare it with the version
-- they were built for (Python: DB_SCHEMA_VERSION in tsapi_pgdb/_version.py).
INSERT INTO meta.schema_version (version, description)
VALUES ('1.2.0', 'meta.series_schemas registry; lower-case table name check');