Conversation
WalkthroughPrimary key column types were widened to 64-bit: MariaDB Changes
Sequence Diagram(s)Changes are limited to DDL adjustments and a test; there is no runtime control-flow or interaction change to illustrate, so no sequence diagram is provided. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
src/Database/Adapter/Postgres.php (1)
263-268: Same version dependency applies to the permissions tableThe permissions table now uses the same
BIGINT … IDENTITYconstruct and therefore shares the version requirement raised above.
🧹 Nitpick comments (1)
src/Database/Adapter/MariaDB.php (1)
188-188: Consider making permissions table PK unsigned for consistency
The main collection usesBIGINT UNSIGNEDfor its_id, but the permissions table uses signedBIGINT. Converting it toBIGINT UNSIGNEDwould maintain consistency across tables.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
composer.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
docker-compose.yml(2 hunks)src/Database/Adapter/MariaDB.php(2 hunks)src/Database/Adapter/Postgres.php(3 hunks)tests/e2e/Adapter/Base.php(1 hunks)tests/e2e/Adapter/Scopes/DocumentTests.php(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/Database/Adapter/Postgres.php (2)
src/Database/Document.php (1)
getSequence(67-70)src/Database/Adapter/SQL.php (2)
getPDO(1532-1535)getSQLTable(1523-1526)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Setup & Build Docker Image
🔇 Additional comments (6)
src/Database/Adapter/MariaDB.php (1)
157-157: Approve primary key upgrade to BIGINT UNSIGNED
The change fromINT(11) UNSIGNEDtoBIGINT UNSIGNEDfor the_idcolumn ensures support for larger auto-increment values while preserving unsigned semantics.tests/e2e/Adapter/Base.php (1)
21-23: Approve trait reordering for bigint sequence tests
MovingCollectionTestsafterDocumentTestsaligns with the newtestBigintSequenceaddition and improves logical grouping of E2E scopes.docker-compose.yml (1)
31-31: Upgrade PostgreSQL service images to 17.5
Updating bothpostgresandpostgres-mirrortopostgres:17.5aligns the test environment with the new PostgreSQL adapter changes.Also applies to: 42-42
tests/e2e/Adapter/Scopes/DocumentTests.php (1)
31-52: ```shell
#!/bin/bashCheck if ext-bcmath is declared as a requirement
grep -R '"ext-bcmath"' -n composer.json
Check for any usage of bcadd or other bcmath functions in the codebase
grep -R "bcadd" -n .
grep -R "bcmul|bcsub|bcdiv" -n .</details> <details> <summary>src/Database/Adapter/Postgres.php (2)</summary> `232-241`: **BIGINT IDENTITY assumes Postgres ≥ 10 – please confirm runtime compatibility** The new `_id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY` syntax is only accepted by PostgreSQL 10+. If any environments (CI, on-prem customers, etc.) are still on 9.6 or earlier this DDL will fail at collection creation time. Would you double-check the lowest Postgres version we officially support and, if needed, guard this with a compatibility branch or update the docs? --- `1030-1039`: **Re-syncing the sequence: verify `pg_get_serial_sequence()` works with IDENTITY columns** After switching to IDENTITY, `pg_get_serial_sequence()` is called to reset the underlying sequence when a manual `$sequence` is supplied. Although Postgres does create a hidden sequence for IDENTITY columns, older drivers and versions (< 12) have occasionally returned `NULL` for this function. ```shell #!/bin/bash # Sanity-check that pg_get_serial_sequence returns a sequence name for an IDENTITY column # and that setval succeeds. Expect: a non-NULL sequence name printed. psql -Atc "CREATE TEMP TABLE tmp(_id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY);" && psql -Atc "SELECT pg_get_serial_sequence('tmp', '_id');"If the command prints an empty line, we’ll need an alternative (e.g.
pg_get_identity_sequence()in v16+ or explicitALTER SEQUENCE).
src/Database/Adapter/MariaDB.php
Outdated
| $permissions = " | ||
| CREATE TABLE {$this->getSQLTable($id . '_perms')} ( | ||
| _id int(11) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| _id BIGINT NOT NULL AUTO_INCREMENT, |
…gint # Conflicts: # composer.lock
…gint # Conflicts: # docker-compose.yml
Summary by CodeRabbit
New Features
Tests