Skip to content

fix: Skip database integrity checks for unmanaged tables - #5756

Merged
marcelomendoncasoares merged 3 commits into
serverpod:mainfrom
marcelomendoncasoares:skip-database-integrity-managed-tables
Sep 24, 2026
Merged

marcelomendoncasoares merged 3 commits into
serverpod:mainfrom
marcelomendoncasoares:skip-database-integrity-managed-tables

Conversation

@marcelomendoncasoares

@marcelomendoncasoares marcelomendoncasoares commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes: #5730
Fixes: #5733 (38748c7)

Pre-launch Checklist

  • I read the Contribute page and followed the process outlined there for submitting PRs.
  • This update contains only one single feature or bug fix and nothing else. (If you are submitting multiple fixes, please make multiple PRs.)
  • I read and followed the Dart Style Guide and formatted the code with dart format.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.
  • I added new tests to check the change I am making.
  • All existing and new tests are passing.
  • Any breaking changes are documented below.

If you need help, consider asking for advice on the discussion board.

Breaking changes

None.

Exclude tables with managedMigration: false from runtime integrity verification while retaining checks for explicitly and implicitly managed tables.

Add PostgreSQL regression coverage for manual expression and partial indexes, custom columns and foreign keys, missing tables, and mixed ownership.

Fixes serverpod#5730
@marcelomendoncasoares
marcelomendoncasoares requested a review from a team September 22, 2026 16:54
@marcelomendoncasoares
marcelomendoncasoares marked this pull request as draft September 22, 2026 17:15
Require unmanaged tables and model columns to exist with compatible types, nullability, and vector dimensions. Ignore defaults and migration-owned schema objects while retaining full validation for managed tables.

Extend PostgreSQL regression coverage for the optional behavior requested in serverpod#5730.
Retain unrecognized PostgreSQL and SQLite timestamp default expressions instead of parsing them as literals. This lets unmanaged tables and extra columns with manual defaults reach ORM integrity validation.

Cover the failures against both databases and preserve timestamp literal normalization. Add SQLite coverage for unmanaged column requirements and custom schema objects.
@marcelomendoncasoares
marcelomendoncasoares marked this pull request as ready for review September 23, 2026 20:38
@marcelomendoncasoares
marcelomendoncasoares merged commit 2100357 into serverpod:main Sep 24, 2026
958 of 960 checks passed
@marcelomendoncasoares
marcelomendoncasoares deleted the skip-database-integrity-managed-tables branch September 24, 2026 22:46
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PostgreSQL schema verification crashes on now() timestamp defaults Skip database integrity checks for tables that have managedMigration: false

2 participants