Skip to content

Fix database column input normalization - #219

Merged
abnegate merged 1 commit into
mainfrom
fix/column-input
Aug 12, 2026
Merged

Fix database column input normalization#219
abnegate merged 1 commit into
mainfrom
fix/column-input

Conversation

@abnegate

Copy link
Copy Markdown
Member

What changed

  • normalize database-reader Utopia\Database\Document column records at the existing Appwrite source boundary
  • preserve the existing array path and column type, format, and size resolution
  • add a focused regression test using a real database document

Verification

  • red before fix: focused regression failed with TypeError: Column::resolve(): Argument #1 ($column) must be of type array, Utopia\Database\Document given
  • green after fix: focused regression passed with 1 test and 2 assertions
  • composer format
  • composer lint
  • composer check
  • isolated CI-equivalent Compose suite: 106 tests, 543 assertions

The host-only full test command cannot run the eight NHost/Supabase E2E cases without their database services; the isolated Compose run supplied those services and passed the complete suite.

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR normalizes database-reader column documents into arrays at the existing Appwrite source boundary while preserving the established column resolution logic.

  • Converts Utopia\Database\Document column records using getArrayCopy() before resolution.
  • Adds a focused regression test confirming string column type and size are preserved.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The normalization occurs before the existing column resolution path, preserves array inputs unchanged, and the regression test directly covers the database-document failure being fixed.

Important Files Changed

Filename Overview
src/Migration/Sources/Appwrite.php Adds narrowly scoped normalization for database-reader Document values before the existing array-based column resolver.
tests/Migration/Unit/Sources/AppwriteColumnTest.php Adds a regression test using a real database document and verifies the resolved string class and size.

Reviews (1): Last reviewed commit: "(fix): normalize database column input" | Re-trigger Greptile

@abnegate
abnegate merged commit a488a6c into main Aug 12, 2026
4 checks passed
@abnegate
abnegate deleted the fix/column-input branch August 12, 2026 07:52
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.

1 participant