Skip to content

feat: add platform singleton flag to metaschema_public.database#98

Merged
pyramation merged 2 commits into
mainfrom
feat/database-platform-flag
Jul 12, 2026
Merged

feat: add platform singleton flag to metaschema_public.database#98
pyramation merged 2 commits into
mainfrom
feat/database-platform-flag

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Upstreams the metaschema_public.database.platform flag from constructive-io/constructive-db#2093, keeping the two copies of metaschema-schema in sync.

platform boolean NOT NULL DEFAULT false,
...
CREATE UNIQUE INDEX databases_database_platform_singleton_idx
  ON metaschema_public.database (platform)
  WHERE platform;

The flag marks the singleton platform (constructive) database — write-once semantics (first setter wins; a trigger in constructive-db's metaschema_private makes it immutable once true). metaschema_private.platform_database_id() in constructive-db is the canonical runtime lookup.

Verify now also asserts the partial unique index; compiled sql/metaschema-schema--0.31.0.sql regenerated via pgpm package (replaces the stale 0.15.5 artifact and syncs Makefile/.control versions).

Link to Devin session: https://app.devin.ai/sessions/7751bd84d4a84873a328def2ec581cba
Requested by: @pyramation

@pyramation pyramation self-assigned this Jul 12, 2026
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation pyramation merged commit b17f6b7 into main Jul 12, 2026
23 checks passed
@pyramation pyramation deleted the feat/database-platform-flag branch July 12, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant