Support extra schemas in Ormin imports#85
Draft
elcritch wants to merge 4 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO $$blocks, generated columns, identity columns, casts, indexes with predicates, triggers, and DML/reference-data statements.CREATE TYPE ... AS ENUMdefinitions, including enums declared inside PostgreSQLDOblocks, so qualified enum columns import asdbEnum.jsonb,bigint,int2, andint4.jsonb, generated identity, generated expressions, references, indexes, triggers, andinsert ... on conflict.Column and Enum names / values
The generated model now preserves each column’s database
type name and enum values through Attr.typeName and
Attr.validValues, then carries those into query source
metadata as DbType.name and DbType.validValues. This lets
downstream code inspect dbEnum columns with their concrete
Postgres enum labels instead of only seeing the generic
dbEnum kind.
Also adds regression coverage for Postgres schema imports
with enum types.
Testing
nim c -r tests/tpostgres_schema_import.nimsam_auth_serveragainst the authoritative PostgreSQL/Supabase schema import path.