fix(structure): keep auto increment on the Postgres family beside the generated fields - #2562
Merged
Merged
Conversation
… generated fields
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Adding generated-column support in #2557 replaced
.autoIncrementin the Postgres family'sstructureColumnFieldsrather than joining it. MySQL, MariaDB and SQLite gained the two new fieldsand kept auto increment; PostgreSQL, CockroachDB and PGlite gained them and lost it.
PostgreSQLPluginDriver.swift:1081still readscol.autoIncrementand still generates the DDL forit, so this removed the control rather than the capability: a
SERIALcolumn had no Auto Incrementflag in the structure editor while the driver went on writing one.
The two spellings both had to move.
PostgreSQLPlugin.structureColumnFieldsis what wins once theplugin loads, and the curated entries are what answer before it does and what
registerVariantkeeps permanently for CockroachDB and PGlite.
How CI reported it
This is the whole of the
Unit testsjob failure on main.StructureRowProviderBooleanOptionsTestswalks every boolean field and records an issue for one the columns tab cannot order, and
.autoIncrementwas the one:The guard
autoIncrementSurvivesTheGeneratedFieldsasserts the four Postgres-family engines offer the field,with Redshift in the list as a control that never gained the generated pair and never lost this one.
declaredBooleanFieldsResolvecovers the shape of the defect rather than this instance: the columnstab looks each boolean field up in the ordered list and skips a miss, so an engine that stops
declaring one loses its editor silently instead of failing.
Negative-tested: with the fix reverted the guard fails on PostgreSQL, CockroachDB and PGlite and
passes on Redshift.
No CHANGELOG entry
#2557 is unreleased, so this never reached a user. CLAUDE.md: do not add a Fixed entry for
something that is itself still unreleased.
What this does not fix
main is also red on all three
UI testsshards, and that is unrelated to this change. FourEditorTabReorderUITestscases have failed every run since #2472 added them on Aug 26, and arotating pair of cases fails with "The sample database never finished opening". All four reorder
cases pass locally, including with the window pinned to the runner's 1024x768 geometry; the one
local failure I could produce came from a loaded machine and took 125s against 25s for a passing
run. Being chased separately.