<#3165 fix: Honor order of primary key columns whe...
# meltano-repo-activity
g
#3165 fix: Honor order of primary key columns when creating an empty table Pull request opened by edgarrmondragon ## Summary by Sourcery Fix the SQLConnector create_empty_table method to preserve the specified order of primary key columns, ignore non‐existent keys, and skip constraints when no keys exist, and add comprehensive tests to validate these behaviors Bug Fixes: • Honor the order of primary key columns when defining an empty table • Ignore missing primary key columns rather than raising errors • Omit primary key constraint when no specified keys exist in the schema Enhancements: • Refactor create_empty_table to use a PrimaryKeyConstraint for ordered key enforcement instead of inline column flags Tests: • Add parameterized tests for key ordering, partial keys, absent keys, and schema order independence in create_empty_table • Add assertion for cursor presence in DuckDB connector tests meltano/sdk