X Tutup
Skip to content

Migration attribute text types#11330

Merged
fogelito merged 11 commits into1.8.xfrom
migration-text-types
Feb 16, 2026
Merged

Migration attribute text types#11330
fogelito merged 11 commits into1.8.xfrom
migration-text-types

Conversation

@fogelito
Copy link
Contributor

What does this PR do?

(Provide a description of what this PR does and why it's needed.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 15, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added creation of four new collection attributes—regulartext, varchar, mediumtext, and longtext—in the CSV export end-to-end test flow. Test documents are populated with these fields, CSV export creation now includes these columns, and post-download verification asserts the presence of the new columns and their data. Additionally, composer.json dependency for utopia-php/migration was changed from 1.5.* to 1.6.*.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only the default repository template with no actual content, failing to describe the change, motivation, test plan, or implementation details. Provide a concrete description explaining what text attribute types were added, why they're needed, and include a clear test plan demonstrating the changes work correctly.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Migration attribute text types' accurately summarizes the main change: adding support for new text attribute types (varchar, mediumtext, longtext, regulartext) to the migration system.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into 1.8.x

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch migration-text-types

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Feb 15, 2026

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
libecpg 18.1-r0 CVE-2026-2004 HIGH
libecpg 18.1-r0 CVE-2026-2005 HIGH
libecpg 18.1-r0 CVE-2026-2006 HIGH
libecpg 18.1-r0 CVE-2026-2007 HIGH
libecpg-dev 18.1-r0 CVE-2026-2004 HIGH
libecpg-dev 18.1-r0 CVE-2026-2005 HIGH
libecpg-dev 18.1-r0 CVE-2026-2006 HIGH
libecpg-dev 18.1-r0 CVE-2026-2007 HIGH
libpq 18.1-r0 CVE-2026-2004 HIGH
libpq 18.1-r0 CVE-2026-2005 HIGH
libpq 18.1-r0 CVE-2026-2006 HIGH
libpq 18.1-r0 CVE-2026-2007 HIGH
libpq-dev 18.1-r0 CVE-2026-2004 HIGH
libpq-dev 18.1-r0 CVE-2026-2005 HIGH
libpq-dev 18.1-r0 CVE-2026-2006 HIGH
libpq-dev 18.1-r0 CVE-2026-2007 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2004 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2005 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2006 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2007 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@tests/e2e/Services/Migrations/MigrationsBase.php`:
- Line 1379: Remove the stray debug call var_dump($csvData) from the
MigrationsBase test code—delete the var_dump($csvData) statement (leave $csvData
intact) so tests no longer print debug output; if you need to inspect data
during development, replace with an assertion or use a test logger instead.
- Around line 1275-1283: The test is calling the wrong endpoint when creating
the longtext attribute: update the client->call invocation that assigns
$longtext so the path uses '/attributes/longtext' instead of
'/attributes/mediumtext' (the call constructing $longtext and the subsequent
assertion $this->assertEquals(202, $longtext['headers']['status-code']) should
remain unchanged); locate the client->call that creates $longtext and swap the
endpoint segment to 'longtext' to ensure the longtext attribute is actually
created and tested.
🧹 Nitpick comments (1)
tests/e2e/Services/Migrations/MigrationsBase.php (1)

1385-1387: Assertion messages are misleading — they reference "column header" but verify data values.

The assertions check for data values (regularText, mediumText, longText) but the messages say "column header". Consider also asserting the actual column headers (regulartext, mediumtext, longtext) to confirm the schema migrated correctly.

Suggested improvement
-        $this->assertStringContainsString('regularText', $csvData, 'CSV should contain the text column header');
-        $this->assertStringContainsString('mediumText', $csvData, 'CSV should contain the medium column header');
-        $this->assertStringContainsString('longText', $csvData, 'CSV should contain the long text column header');
+        // Verify column headers
+        $this->assertStringContainsString('regulartext', $csvData, 'CSV should contain the regulartext column header');
+        $this->assertStringContainsString('mediumtext', $csvData, 'CSV should contain the mediumtext column header');
+        $this->assertStringContainsString('longtext', $csvData, 'CSV should contain the longtext column header');
+
+        // Verify data values
+        $this->assertStringContainsString('regularText', $csvData, 'CSV should contain regularText data');
+        $this->assertStringContainsString('mediumText', $csvData, 'CSV should contain mediumText data');
+        $this->assertStringContainsString('longText', $csvData, 'CSV should contain longText data');

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@tests/e2e/Services/Migrations/MigrationsBase.php`:
- Around line 1389-1391: The three assertions currently check for the data
values 'regularText', 'mediumText', 'longText' but use "column header" messages
and omit checks for the actual header names; update the assertions that
reference assertStringContainsString and $csvData to look for the lowercase
header strings 'regulartext', 'mediumtext', 'longtext' and change each message
to "CSV should contain the <name> column header"; if you still need to assert
the presence of the data values, add separate assertions that check for the
patterned data (e.g., 'regularText') with messages indicating they verify data
rows rather than headers.

@github-actions
Copy link

github-actions bot commented Feb 15, 2026

✨ Benchmark results

  • Requests per second: 1,679
  • Requests with 200 status code: 302,222
  • P99 latency: 0.095637186

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,679 882
200 302,222 158,796
P99 0.095637186 0.25413455

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@composer.json`:
- Line 68: The composer dependency "utopia-php/migration" is pinned to a dev
branch and contains a double space in the alias; replace the unstable dev
reference with a stable tagged version (e.g., change the "dev-text-attributes as
1.5.2" entry to a proper release constraint such as "1.5.2" or "1.6.*") and
remove the extra space after "as" if you keep an alias; update the composer.json
entry for "utopia-php/migration" accordingly and run composer update to lock the
resolved stable version.

@fogelito fogelito merged commit 2e8358c into 1.8.x Feb 16, 2026
166 of 169 checks passed
@fogelito fogelito deleted the migration-text-types branch February 16, 2026 11:06
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.

2 participants

X Tutup