Repository navigation
corpus: six migration shapes from real-world schemas - #19
Merged
Merged
Conversation
Arrays whose element has a modifier, mixed-case domains and their arrays, a domain in use gaining a NOT VALID check, a partitioned table gaining a column, and partitions kept in another schema than their parent — each from a widely used public schema, none previously in the corpus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On PostgreSQL 18 a NOT NULL is a named constraint, and a partition attached after creation keeps its own name while one made with PARTITION OF takes the parent's. The after side made p_2 the other way, so the case differed in a name unrelated to the column it tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Six migration cases taken from widely used public schemas (AdventureWorks, Pagila, GitLab's
structure.sql). The corpus had no case for any of them, and DBDiff got all six wrong (DBDiff/DBDiff#285):array_columns_keep_their_modifiers:varchar(20)[],numeric(10,2)[],timestamptz(3)[],bit(4)[]added to a table with rows.array_modifier_tightened:varchar[]becomesvarchar(20)[].mixed_case_domains_and_their_arrays: columns of"Name","Flag","Name"[]and"Mood"[].domain_in_use_gains_not_valid_check: a domain in use gains aNOT VALIDcheck that an existing row breaks.partitioned_table_gains_a_column: one partition made withPARTITION OFand one attached later.partitions_in_another_schema: hash partitions of apublictable kept in their own schema.npm testpasses on PostgreSQL 15, 17 and 18 (43 pass, 0 fail; the one TODO is already on main).Ordering: DBDiff and SupaForge both pin this package through their lockfiles, so nothing changes for them until they bump. Bump each one only together with a DBDiff release that includes DBDiff/DBDiff#285. Until then these cases fail its corpus job and SupaForge's scenarios.
🤖 Generated with Claude Code