Skip to content

Fix namespace qualification and add provider-wide namespace tests - #201

Open
jogibear9988 wants to merge 6 commits into
masterfrom
codex/schema-provider-coverage
Open

jogibear9988 wants to merge 6 commits into
masterfrom
codex/schema-provider-coverage

Conversation

@jogibear9988

@jogibear9988 jogibear9988 commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Fix namespace handling where DDL targeted one schema/database while metadata inspected another. Explicitly qualified names now override the configured default, native catalogs scope lookups to the same object, and shared column/table mutations preserve that namespace. PostgreSQL index lookup no longer mixes identical names from different schemas.

Includes provider-specific catalog, index, rename and foreign-key fixes, plus SQLite attached-database rebuilds that preserve indexes, triggers, data and AUTOINCREMENT state. Ingres now implements structured PK/unique/check/FK and index metadata, composite and cross-owner foreign keys, secondary-index creation, constraint-backed index removal, and incoming/outgoing foreign-key removal. Its DROP COLUMN and DROP CONSTRAINT statements use native RESTRICT syntax.

Tests cover all 16 provider selectors through command contracts, four naming modes on all 11 live CI engines, duplicate-name isolation on seven engines, and dotted attached-database names on both SQLite selectors. The lifecycle covers tables, views, columns/defaults, data, PK/FK/unique/index metadata, removal and supported renames. Another 19 Ingres regressions execute the catalog SELECTs against an independent SQLite catalog fixture and check DDL contracts, including duplicate schemas, key ordering, included columns, CHAR padding, segmented constraint text and referential actions.

Validation: 1,250 unit/SQLite tests pass locally with zero failures or skips. The preceding revision passed all 2,546 CI tests and the combined coverage check; CI is rerunning for the Ingres follow-up. The opt-in Ingres lifecycle fixture compiles and discovers four additional cases, but has not been executed against Ingres.

Engine and verification limits are documented in docs/namespace-support.md: Firebird 5 rejects namespaces and table rename; SQLite rejects cross-database foreign keys; ASE index removal and rename require the connection owner namespace. Ingres live verification requires a licensed test instance and a compatible Actian driver; none is available for this change. Its executable catalog tests are not a substitute for live engine validation. Firebird 6 schemas are outside this provider qualification.

Fixes #48.

Resolve qualified table names consistently in native catalogs and honor the
factory defaultSchema for every provider. Scope table enumeration to the
selected namespace instead of hardcoding public/current-user or assuming
ADO.NET GetSchema restriction positions.

Fix MySQL/MariaDB and Db2 catalogs, Informix/Sybase owner qualification,
SQL Server column lookups and renames, Oracle/HANA index namespaces, and
namespace-preserving renames. Add native Ingres table/view/column and
constraint/index-existence queries. Explicitly reject namespaces for the
Firebird 5 provider.

Keep SQLite attached-database metadata, rebuild temporary tables, indexes,
triggers and AUTOINCREMENT sequence state in the original namespace.
Scope dependent-table scans and check FK integrity across attached databases;
reject cross-database SQLite foreign keys before creating a table.

Add contracts for all 16 public provider selectors, live lifecycle cases in
four naming modes for all 11 CI engines, seven-engine duplicate-name isolation
cases, and SQLite/MonoSQLite attached-database regression tests. Reuse the
existing disposable-provider fixture and document engine/verification limits.

Validation: 1,231 unit/SQLite tests passed locally, zero failures or skips.
Server database validation runs in PR CI; Docker is unavailable locally.
Ingres has no configured live engine job and retains its pre-existing
unsupported structured index/FK metadata operations.

Refs #48
Copilot AI lite review requested due to automatic review settings September 25, 2026 17:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Use provider column rendering in namespace lifecycle views and scalar queries so HANA tests query the same identifiers created by the provider. Validation: all 1,231 unit and SQLite tests pass.
Copilot AI review requested due to automatic review settings September 25, 2026 17:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Scope PostgreSQL index queries by relation identity; resolve quoted ASE owners through native catalogs; preserve Oracle index folding and automatically quoted namespace names. Route HANA single-action foreign keys through supported RESTRICT mapping. Keep Firebird constraint names separate from namespace validation and reject its unsupported native table rename explicitly. Make unique-key test columns non-null for Db2 and expose per-test CI progress. Validation: 1,231 local unit/SQLite tests pass; live matrix rerun required.
Copilot AI review requested due to automatic review settings September 25, 2026 17:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Render the resolved table name for shared RenameColumn and RemoveColumn commands, including default and automatically quoted namespaces. Extend duplicate-name tests to cover both operations. Validate ASE rename ownership before using the local name required by sp_rename. Reconnect the Firebird lifecycle fixture before final DROP to release compiled metadata dependencies after view and foreign-key changes. Validation: 1,231 unit/SQLite tests pass locally; previous server run passes SQL Server, PostgreSQL, MySQL, MariaDB, Db2, Informix and HANA.
Copilot AI review requested due to automatic review settings September 25, 2026 17:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Normalize rename destinations with the same dialect quoting rules as sources so Oracle numeric-leading mixed-case schema names retain identity. Use an owner-checked local ASE table for DROP INDEX, which rejects three-part names. Remove dependent indexes before column rename in the isolation fixture for Db2. Serialize disposable Oracle user cleanup to prevent concurrent DROP USER dictionary-lock conflicts observed in CI. Validation: all 1,231 unit/SQLite tests pass locally.
Copilot AI review requested due to automatic review settings September 25, 2026 17:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Implement structured PK, unique, check and composite foreign-key catalogs with schema-qualified joins, exact parent identity, ordered key pairs and segmented definition parsing. Inspect and create secondary indexes, distinguish their backing constraints, and scope index/constraint/column and incoming/outgoing foreign-key removal to the requested owner.

Add 19 executable catalog and DDL contract regressions covering all four namespace modes, duplicate names, included columns, quoted parents, CHAR padding and referential actions. Add an opt-in live Ingres lifecycle fixture. Local validation: 1,250 unit/SQLite tests pass with zero skips; live fixture compiles and discovers four additional cases. A live Ingres run remains unavailable because no licensed instance is available.
Copilot AI review requested due to automatic review settings September 25, 2026 18:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
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.

Schema is not supported in almost any case e.g. in AddTable

2 participants