Skip to content

Conversation

@marcus-steinbach
Copy link
Collaborator

Changes

Fixes #.

Checklist

If this is a user-facing code change, like a bugfix or a new feature, please ensure that
you've fulfilled the following conditions (where applicable):

  • You've added tests (in tests/) which would fail without your patch
  • You've added a new changelog entry (in CHANGES.rst).

If this is a trivial change, like a typo fix or a code reformatting, then you can ignore
these instructions.

Updating the changelog

If there are no entries after the last release, use **UNRELEASED** as the version.
If, say, your patch fixes issue #123, the entry should look like this:

- Fix big bad boo-boo in task groups
  (`#123 <https://github.com/agronholm/sqlacodegen/issues/123>`_; PR by @yourgithubaccount)

If there's no issue linked, just link to your pull request instead by updating the
changelog after you've created the PR.

@marcus-steinbach marcus-steinbach requested review from igrabow and sweh July 10, 2025 03:56
- Fixed incorrect generation of Index objects using qualified column names or Text() objects, which led to broken SQL DDL and database errors.
- Ensured all Index columns are created with unqualified column names and as actual Column objects, not Text() expressions, resolving issues with CREATE INDEX syntax.
- Added logic to correctly handle special Postgres index operator classes (e.g., gin_trgm_ops) when needed, ensuring compatibility with extensions like pg_trgm.
- Refactored index handling to avoid assigning to read-only properties (e.g., Index.columns), instead removing and recreating indexes as required.
- Improved generator output to set table schema and comments where necessary.
- General cleanup and clarification of index and table argument rendering.

Fixes issues with model-generated DDL not matching the database schema and errors when running Base.metadata.create_all().
Copy link
Member

@sweh sweh left a comment

Choose a reason for hiding this comment

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

Nichts auffälliges gesehen, Tests gehen noch kaputt, aber das ignorieren wir hier vermutlich, ist ja eh nur für zwei Mal (ClaimX und MCI)

@sweh sweh merged commit d7fc26c into master Jul 16, 2025
1 of 6 checks passed
@sweh sweh deleted the 35679_create_pg_publication_and_pg_index branch July 16, 2025 11:19
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.

3 participants