Skip to content

[migrations] use expression syntax for JSON default#243

Open
capcom6 wants to merge 2 commits into
masterfrom
issue/242-mysql-compatibility
Open

[migrations] use expression syntax for JSON default#243
capcom6 wants to merge 2 commits into
masterfrom
issue/242-mysql-compatibility

Conversation

@capcom6

@capcom6 capcom6 commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation

    • Clarified minimum supported database versions (MySQL 5.7.8+ or MariaDB 10.2.7+) across documentation and configuration examples
    • Recommended MariaDB LTS as the preferred deployment target
  • Chores

    • Updated deployment and configuration documentation to reflect database compatibility requirements
    • Database schema migration for enhanced data storage

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@capcom6, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 24 minutes and 34 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fd42bcb5-1b77-429d-9828-16450ef67a98

📥 Commits

Reviewing files that changed from the base of the PR and between b96fac6 and 87f43cf.

📒 Files selected for processing (4)
  • .env.example
  • README.md
  • configs/config.example.yml
  • deployments/helm-chart/README.md
📝 Walkthrough

Walkthrough

Documentation across README.md, .env.example, configs/config.example.yml, deployments/docker-compose/docker-compose.yml, and deployments/helm-chart/README.md is updated to specify MySQL 5.7.8+ or MariaDB 10.2.7+ as minimum supported versions and recommend MariaDB LTS. The sim_cards migration is also fixed to use DEFAULT ('[]') syntax for MariaDB JSON column compatibility.

Changes

MariaDB Compatibility Clarification and Migration Fix

Layer / File(s) Summary
Database version requirements across docs and configs
README.md, .env.example, configs/config.example.yml, deployments/docker-compose/docker-compose.yml, deployments/helm-chart/README.md
All user-facing documentation and example configs updated to state MySQL 5.7.8+ or MariaDB 10.2.7+ minimum versions and recommend mariadb:lts as the most-tested deployment target.
JSON DEFAULT syntax fix in sim_cards migration
internal/sms-gateway/models/migrations/mysql/20260507035019_device_sim_cards.sql
DEFAULT '[]' changed to DEFAULT ('[]') for the sim_cards JSON column, using the parenthesized expression form required by MariaDB.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title '[migrations] use expression syntax for JSON default' directly describes the primary change in the MySQL migration file, where DEFAULT '[]' was changed to DEFAULT ('[]'). However, the PR also includes unrelated documentation updates to .env.example, README.md, config files, and Helm charts that clarify database version compatibility, which are not captured in the title.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@internal/sms-gateway/models/migrations/mysql/20260507035019_device_sim_cards.sql`:
- Line 4: The migration attempts to set a DEFAULT value ('[]') on the sim_cards
JSON column, which is incompatible with MySQL 5.7.x where JSON columns cannot
have default values. Either update the minimum MySQL version requirement to
8.0.13+ in all documentation files (README.md, .env.example,
helm-chart/README.md) and deployment configurations, or remove the DEFAULT
('[]') clause from the sim_cards column definition in the migration and handle
the JSON default value at the application level when initializing device records
or querying them.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a695e37d-0a29-4d85-8837-850c661027a9

📥 Commits

Reviewing files that changed from the base of the PR and between f914877 and b96fac6.

📒 Files selected for processing (6)
  • .env.example
  • README.md
  • configs/config.example.yml
  • deployments/docker-compose/docker-compose.yml
  • deployments/helm-chart/README.md
  • internal/sms-gateway/models/migrations/mysql/20260507035019_device_sim_cards.sql

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

🤖 Pull request artifacts

Platform File
🐳 Docker GitHub Container Registry
🍎 Darwin arm64 server_Darwin_arm64.tar.gz
🍎 Darwin x86_64 server_Darwin_x86_64.tar.gz
🐧 Linux arm64 server_Linux_arm64.tar.gz
🐧 Linux i386 server_Linux_i386.tar.gz
🐧 Linux x86_64 server_Linux_x86_64.tar.gz
🪟 Windows arm64 server_Windows_arm64.zip
🪟 Windows i386 server_Windows_i386.zip
🪟 Windows x86_64 server_Windows_x86_64.zip

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.

Migration fails with MySQL STRICT_TRANS_TABLES: JSON column 'sim_cards' can't have a default value

1 participant