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>
This commit is contained in:
peter 2026-10-06 11:42:10 +01:00
parent 155fc7c3dd
commit 4c067bc4b9
7 changed files with 59 additions and 5 deletions

View file

@ -1,4 +1,4 @@
-- Reference data (timezones and currencies)
-- Reference data (series schema registry, timezones, currencies, security types)
-- Generated: 2025-10-15T12:24:56.582392
-- Timezones
@ -767,3 +767,7 @@ VALUES
('OPT', 'Option', 'Equity and index options', NULL),
('STK', 'Stock', 'Common and preferred equities', NULL),
('WAR', 'Warrant', 'Equity warrants', NULL);
-- Series schema registry: the default schema, created in 01_schemas.sql
INSERT INTO meta.series_schemas (name, description)
VALUES ('series', 'Default series schema');