Yearning
AI agentic SQL review and database change governance platform for MySQL, PostgreSQL, TiDB, OceanBase and PolarDB.
At a Glance
Free forever, open-source (AGPL-3.0-or-later) self-hosted edition with unlimited users and datasources.
Engagement
Available On
Alternatives
Listed Nov 2026
About Yearning
Yearning is a self-hosted SQL review and database change governance platform maintained by Henry Yee (cookieY). Version 4 is a ground-up rebuild in Go and React 19 on a PostgreSQL metadata store, currently in public beta. It combines AI-assisted SQL precheck, multi-stage approvals, in-process gh-ost online DDL, rollback, governed queries and SQL diagnostics.
What It Is
Yearning is a governance layer for database changes. Developers submit DDL/DML change orders, and each batch (up to 100,000 statements / 32 MiB) is lexed and fingerprinted. Homologous statements are grouped so an AI review agent inspects one representative anonymized statement per group. The agent uses five read-only metadata tools (syntax check, table description, indexes, table stats and safe EXPLAIN) together with 48 built-in rules, custom prompt skills and team knowledge. Rule violations block submission deterministically, while free-form LLM observations are capped at medium severity.
Approvals, Execution and Rollback
Change flows support 1..N serial datasource stages and 1..10 approval steps per stage. Rules, stages, approvers, executors and the SQL hash are frozen at submission, and approval never auto-executes. Native MySQL ALTER TABLE changes can run through gh-ost embedded in-process with 18 tunable parameters. Rollback captures in-transaction DML before-images (up to 100,000 rows) and reversible DDL schema snapshots across MySQL and PostgreSQL without relying on binlog or WAL, and can derive a linked rollback order that goes through the same governance.
Query, Diagnostics and AI Assistant
A governed read-only query workspace issues time-bounded query grants, enforces read-only AST guards and masks sensitive columns server-side before rows leave the backend. Exports to CSV, JSONL and XLSX are controlled per datasource. Top-SQL diagnostics read performance_schema or pg_stat_statements and present six overview charts plus a four-section AI root-cause report. A scoped Database AI Assistant answers platform questions and drafts SQL from natural language, but never executes SQL itself.
Privacy, Deployment and Agent Integration
AI traffic uses two tracks: a cloud track that anonymizes literals and identifiers in memory, and a LAN track for self-hosted vLLM or Ollama models that does not fall back to cloud providers. Deployment options include Docker Compose, a standalone binary and Kubernetes, with a documented v3 to v4 migration path. An OpenAPI 3 spec, an SSE event stream and a SKILL.md agent skill with a Python helper let agents such as Claude Code or Codex call the API. The project is dual-licensed under AGPL-3.0-or-later with commercial licenses available.
Community Discussions
Be the first to start a conversation about Yearning
Share your experience with Yearning, ask questions, or help others learn from your insights.
Pricing
Community Edition
Free forever, open-source (AGPL-3.0-or-later) self-hosted edition with unlimited users and datasources.
- Unlimited users & datasources
- Full SQL change review, frozen multi-stage approvals, and audit trails
- Privacy-preserving AI precheck, 48 built-in rules, custom prompt tools, and knowledge base
- Scoped Database AI Assistant and SQL performance diagnostics (Bring-Your-Own-Key)
- Cross-engine AST rollback evidence and in-process gh-ost online DDL
Yearning v4 Pro
Annual license for 1 self-hosted cluster with all v4.x updates; currently in early access.
- 1 self-hosted cluster
- Unlimited users & datasources
- All v4.x updates
- GitOps PR Precheck
- TOTP MFA, anti-screenshot watermarking, custom branding
- Query workspace upgrades and read-only MySQL-compatible query gateway
- Pre-built Pro images, offline bundles, Helm charts
Yearning v4 Pro License
One-time v4 License for 1 self-hosted cluster: perpetual v4.x use plus 2 years of updates.
- 1 self-hosted cluster
- Unlimited users & datasources
- Perpetual v4.x use + 2 years of updates
Commercial / Custom
License without AGPL-3.0 copyleft, custom dialects, or formal SLA.
- License without AGPL-3.0 copyleft
- Custom dialects
- Formal SLA
Capabilities
Key Features
- AI agentic SQL precheck with 5 read-only metadata tools and 48 built-in rules
- Dual fingerprinting of up to 100,000 statements per batch
- Cloud and local LAN AI tracks with in-memory anonymization
- Frozen multi-stage approval flows
- In-process gh-ost online DDL
- Binlog-free cross-engine automatic rollback
- Governed read-only query workspace with server-side PII masking
- Top-SQL diagnostics with AI root-cause reports
- Scoped Database AI Assistant for NL-to-SQL
- LDAP and OIDC SSO
- Notifications via Email, DingTalk, Feishu and Slack
- OpenAPI 3 spec and SKILL.md agent skill
- 90-day append-only audit logs
