Skip to content

Update review-ready changes#19

Open
syntaxwanderer wants to merge 1 commit intomasterfrom
develop
Open

Update review-ready changes#19
syntaxwanderer wants to merge 1 commit intomasterfrom
develop

Conversation

@syntaxwanderer
Copy link
Copy Markdown
Member

Summary

  • Review-ready branch develop targeting master
  • 1 commit(s) ahead, 12 changed file(s)

Changes

  • Fix Adapter, OrmManager.php, and related areas

Checks

  • No repo-defined automated checks were found

What to Review

  • src/Adapter
  • src/OrmManager.php
  • src/Query
  • src/Schema
  • src/Sync
  • src/Transaction

What to Verify

  • Smoke-check the main behavior changed by this branch
  • Watch logs or console output for regressions in touched paths

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

Warning

Rate limit exceeded

@syntaxwanderer has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 59 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 29 minutes and 59 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 31b92ffe-e637-45ed-b804-510d39051e47

📥 Commits

Reviewing files that changed from the base of the PR and between a412fd8 and c8f4a96.

📒 Files selected for processing (12)
  • src/Adapter/DatabaseType.php
  • src/Adapter/MySqlType.php
  • src/Adapter/ServerCapability.php
  • src/Adapter/SqliteAdapter.php
  • src/Adapter/SqliteType.php
  • src/OrmManager.php
  • src/Query/InsertQuery.php
  • src/Schema/ColumnDefinition.php
  • src/Schema/SchemaCollector.php
  • src/Schema/SqliteSchemaComparator.php
  • src/Sync/SyncEngine.php
  • src/Transaction/TransactionManager.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8f4a9626c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +105 to +109
if ($this->resolveDriver() === 'sqlite') {
$this->schemaComparator = new SqliteSchemaComparator(
$this->getAdapter(),
$this->resolveIgnoreTables(),
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Return a SchemaComparator-compatible SQLite comparator

When DB_DRIVER=sqlite, this branch assigns new SqliteSchemaComparator(...) into $this->schemaComparator, but the property and method are both typed as SchemaComparator; because SqliteSchemaComparator does not extend SchemaComparator, PHP will throw a TypeError as soon as this path is hit, so schema comparison/sync is broken for SQLite environments.

Useful? React with 👍 / 👎.

Comment on lines +359 to +362
if ($isSqlite) {
// SQLite: indexes are created separately, not inline in CREATE TABLE
// We'll handle them after table creation
} else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Emit index DDL for new SQLite tables

In SQLite mode this block intentionally skips inline index creation, but no compensating ADD INDEX/CREATE INDEX operations are generated for brand-new tables (the comparator only adds createTable for missing tables), so declared unique/non-unique indexes are silently omitted on initial table creation, which can break uniqueness guarantees and index-dependent query performance.

Useful? React with 👍 / 👎.

Comment on lines +196 to +199
$expectedType = $code->type->canonicalName($code->length, $code->precision, $code->scale);
$dbTypeNormalized = $this->normalizeDbType($db->columnType);

if ($this->normalizeType($expectedType) !== $dbTypeNormalized) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Compare SQLite columns using compatible type normalization

This comparator derives $expectedType directly from $code->type->canonicalName(...), but model columns are still declared as MySqlType (via #[Column]), so values like int/varchar(255) are compared against SQLite-normalized integer/text, causing persistent false-positive type diffs and repeated alter operations for unchanged schemas.

Useful? React with 👍 / 👎.

Comment on lines +382 to +383
$constraintName = "fk_{$tableName}_{$fk['from']}_{$fk['id']}";
$fks[$constraintName] = [
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Key SQLite foreign keys with the canonical constraint name

Here DB foreign keys are keyed as fk_{table}_{column}_{id}, but code-side keys come from ForeignKeyDefinition::constraintName() (fk_{table}_{column}), so compareForeignKeys will never match existing constraints and will keep scheduling add/drop FK changes every run, making FK diffing unreliable.

Useful? React with 👍 / 👎.

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