You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7fc4da9
Browse filesBrowse the repository at this point in the historyBrowse files
Flydb is a versioned schema migration tool for databases with JDBC drivers: built-in dialects for mainstream databases, first-class support for Chinese Xinchuang databases, and extension to niche JDBC databases through the `DatabaseType` SPI.
Flydb helps developers and operators manage versioned database changes. Use the local GUI to organize configurations, review SQL and watch execution; use the CLI in scripts and CI; copy context to an Agent when you want help. All three entry points share the same configuration and migration engine, while the GUI and local CLI share execution records.
16
19
17
-
**Today**, Flydb 0.2 is a reliable migration runtime: commands such as `migrate`, `info`, `validate`, `baseline`, `repair`, `undo`, and `clean`, backed by concurrency locks, transaction semantics, checksum validation, and failure blocking with recovery; eight built-in dialects; and Spring Boot 2/3 starters. **The long-term direction** is a database change capability shared safely by humans and AI agents: agents decide *what* changes; Flydb guarantees *how* it changes safely. See the [roadmap](./ROADMAP.md) (in Chinese) for stage goals and current progress.
20
+
MySQL, PostgreSQL, Oracle and Chinese databases including OceanBase, TiDB, DM8, KingbaseES and openGauss. **Run with Java 8+; the GUI needs no Node.js, network access or language model.**
18
21
19
-
> **Scope boundary:** Flydb manages migration versions, execution safety, and database dialect behavior. It does not translate arbitrary vendor SQL into every database syntax. Keep separate migration directories for database families when their dialects differ; see the [multi-environment guide](./docs/getting-started/multi-environment.md#4-脚本仓库按数据库家族分目录).
22
+

23
+
*Actual workbench UI using fictional demonstration configurations and migration records.*
20
24
21
-
## Why Flydb
25
+
## Choose how you work
22
26
23
-
-**Xinchuang databases as first-class citizens**: DM8 (Dameng), KingbaseES, openGauss, OceanBase, and TiDB ship as built-in dialects alongside MySQL, PostgreSQL, and Oracle. The CLI never bundles vendor drivers; it resolves them from `drivers/`, the runtime classpath, or a Maven repository, which fits drivers that cannot be distributed publicly.
24
-
-**Zero-dependency Java 8 core**: `flydb-core` has no third-party runtime dependencies (enforced by Maven Enforcer) and drops into any legacy Java 8 system; Boot 3 / Java 17 environments use a separate starter.
25
-
-**Friendly to humans and agents alike**: stable exit and error codes, `--dry-run` previews, non-interactive operation; the distribution ships an Agent Skill and docs matched to the CLI version.
26
-
-**Safe defaults**: `clean` is disabled by default and needs a double opt-in; failed migrations block subsequent runs; passwords come from environment variables or password files, never commands, logs, or SQL.
27
+
| Your workflow | What Flydb provides |
28
+
|---|---|
29
+
| Manage development, staging and production configurations | Collapsible groups, drag-and-drop organization, forms and an advanced editor for the original files |
30
+
| Review an upgrade before applying it | SQL previews, version search, pagination, full-text search and complete SQL downloads |
31
+
| Follow execution and diagnose failures | Script progress, transaction outcomes and post-run verification; unknown outcomes stay explicit |
32
+
| Bring in an Agent | “Copy for Agent” packages redacted settings, migration state and recent errors; Skills, JSON and MCP offer further integration |
33
+
| Automate migrations in an application or pipeline | CLI for CI, a Java API and Spring Boot 2/3 starters sharing the same engine |
27
34
28
-
## Quick start
35
+
## Open the GUI with one command
29
36
30
-
Prerequisites: Java 8 or newer, an existing target database, and a Java 8-compatible JDBC driver.
37
+
Download the ZIP from [Releases](https://github.com/zzxCoding/Flydb/releases/latest), extract it and run:
# Example: place mysql-connector-j.jar into drivers/
38
-
cp /path/to/mysql-connector-j.jar drivers/
44
+
On Windows, use `bin\flydb.bat web`. Import an existing `flydb.conf` or create a configuration in the browser, then provide the JDBC driver for your database. No account setup; Chinese / English and light / dark themes are included. Starting the workbench does not run migrations.
45
+
46
+
Open an existing configuration directly:
47
+
48
+
```bash
49
+
bin/flydb --config /path/to/project/flydb.conf web
50
+
```
51
+
52
+
See the [GUI guide](./docs/getting-started/web.en.md). Vendor JDBC drivers are supplied by the user under their respective licenses, not bundled in the ZIP.
53
+
54
+
<details>
55
+
<summary><strong>Prefer a terminal? Start with the CLI</strong></summary>
39
56
40
-
bin/flydb init \
41
-
--url 'jdbc:mysql://127.0.0.1:3306/demo' \
42
-
--user flydb_user \
43
-
--database-type mysql \
44
-
--yes
57
+
For an existing MySQL database:
45
58
59
+
```bash
60
+
cp /path/to/mysql-connector-j.jar drivers/
61
+
bin/flydb init --url 'jdbc:mysql://127.0.0.1:3306/demo' --user flydb_user --database-type mysql --yes
46
62
export FLYDB_PASSWORD='replace-me'
63
+
bin/flydb validate
47
64
bin/flydb --dry-run migrate
65
+
# Review the SQL and target before applying
48
66
bin/flydb migrate
49
67
bin/flydb info
50
-
bin/flydb validate
51
68
```
52
69
53
-
`init` generates `flydb.conf`, `db/migration/V1__init.sql`, and `drivers/README.md`, and never overwrites existing files. Passwords can also be supplied through `flydb.password=${env:DB_PASSWORD}` or `flydb.password.file=/run/secrets/db_password`; a plaintext `flydb.password` is only recommended for local throwaway testing.
70
+
`init` generates `flydb.conf`, `db/migration/V1__init.sql` and `drivers/README.md`, refusing to overwrite existing files. The V1 sample contains `SELECT 1;`; replace it with your actual changes. Environment variables and password files are also supported.
71
+
72
+
</details>
73
+
74
+
## One migration engine across every entry point
75
+
76
+
-**Review before execution**: checksum validation, concurrency locks, transaction handling and failure blocking. Changes to configuration or scripts after a preview are rechecked.
77
+
-**Fit existing environments**: a Java 8 core with zero third-party runtime dependencies, a standalone CLI ZIP, and Spring Boot 2/3 starters.
78
+
-**Work across database families**: built-in dialects and driver loading, extensible through `DatabaseType` SPI. Verification levels are documented below.
79
+
-**Share facts with your Agent**: structured JSON, Plan Artifacts and execution records. Unknown or interrupted migrations are never automatically replayed. GUI clean requires risk acknowledgment and typing `CLEAN`.
80
+
81
+
Flydb manages migration workflow and database dialect behavior. It does not translate arbitrary vendor SQL into other database syntaxes; keep separate migration directories where dialects differ.
54
82
55
83
## Database support
56
84
@@ -72,7 +100,8 @@ See the [database getting-started guides](./docs/getting-started/README.md) for
72
100
73
101
-[x]**Reliable migration runtime**: engine, 8 built-in dialects, CLI, Spring Boot starters, Agent Skill, the `v0.2.0` GitHub Release, and the `v0.2.1` Maven Central publishing
74
102
-[x]**DX and machine contract**: `--json` machine-readable output, protocolVersion contract versioning, CI integration docs, an Agent Plugins 1.0 package (`v0.3.0`; package managers and a Docker image on demand)
75
-
-[x]**Agent distribution**: an MCP adapter (TypeScript, nine domain tools, writes unregistered by default) plus the Plan Artifact v1 plan digest; the npm package ships with the next release
103
+
-[x]**Agent distribution**: an MCP adapter (TypeScript, nine domain tools, writes unregistered by default) plus the Plan Artifact v1 plan digest; a built adapter ships in the CLI ZIP
104
+
-[x]**Local workbench**: multiple configurations, groups, migration previews, execution records and Agent handoff
@@ -175,7 +204,7 @@ The full reactor, including the Boot 3 modules, is built with Java 17; the Boot
175
204
./mvnw verify
176
205
```
177
206
178
-
The CLI distribution is generated at `flydb-cli/target/flydb-cli-0.3.6.zip`. The core module enforces an 80% JaCoCo line-coverage gate and zero non-test runtime dependencies via Maven Enforcer.
207
+
The CLI distribution is generated at `flydb-cli/target/flydb-cli-0.3.7.zip`. The core module enforces an 80% JaCoCo line-coverage gate and zero non-test runtime dependencies via Maven Enforcer.
179
208
180
209
Database integration contracts are skipped by default. Set `-Pmysql`/`-Ppostgresql` and `-Dflydb.integration.database=<dialect>` explicitly to start temporary databases and run the selected tests. The full matrix runs in `.github/workflows/ci.yml`.
0 commit comments