diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..23c5bc9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,68 @@ +name: Bug 报告 +description: 报告可复现的 Flydb 行为错误 +title: "[Bug] " +labels: + - bug +body: + - type: markdown + attributes: + value: | + 感谢报告。请删除密码、令牌、完整生产连接串和业务数据;安全漏洞请使用仓库 Security 页面的私密报告入口。 + - type: input + id: flydb-version + attributes: + label: Flydb 版本 + placeholder: 例如 0.2.0 + validations: + required: true + - type: input + id: environment + attributes: + label: Java、数据库与驱动版本 + placeholder: 例如 Java 17 / MySQL 8.0 / Connector-J 8.2.0 + validations: + required: true + - type: dropdown + id: interface + attributes: + label: 使用入口 + options: + - CLI + - Java API + - Spring Boot 2 Starter + - Spring Boot 3 Starter + - Agent Skill + - 其他 + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: 最小复现步骤 + description: 包含脱敏后的配置来源、命令和迁移文件结构。 + validations: + required: true + - type: textarea + id: expected + attributes: + label: 预期行为 + validations: + required: true + - type: textarea + id: actual + attributes: + label: 实际行为、退出码与脱敏日志 + validations: + required: true + - type: textarea + id: verification + attributes: + label: 已尝试的验证 + description: 例如 validate、dry-run、定向测试或真实实例验证。 + - type: checkboxes + id: safety + attributes: + label: 安全确认 + options: + - label: 我已删除密码、令牌、完整生产连接串和业务数据 + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..f38ad5a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: 使用文档 + url: https://github.com/zzxCoding/Flydb/blob/main/SUPPORT.md + about: 提问前先查看快速开始、数据库指南、命令、配置和错误码参考。 + - name: 私密安全报告 + url: https://github.com/zzxCoding/Flydb/security/advisories/new + about: 漏洞或可能暴露凭据的问题请通过私密安全通道报告。 diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..966c7be --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,43 @@ +name: 功能建议 +description: 提议一个有明确使用场景的 Flydb 改进 +title: "[Feature] " +labels: + - enhancement +body: + - type: textarea + id: problem + attributes: + label: 要解决的问题 + description: 描述用户、环境和当前受阻的工作流,不要只给出实现方案。 + validations: + required: true + - type: textarea + id: outcome + attributes: + label: 期望结果 + description: 说明成功后的可观察行为和安全边界。 + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: 当前替代方案 + - type: dropdown + id: scope + attributes: + label: 主要影响范围 + options: + - Core API / migration engine + - CLI + - Configuration + - Spring Boot Starter + - Database dialect / JDBC integration + - Documentation / Agent Skill + - Release / installation + validations: + required: true + - type: textarea + id: evidence + attributes: + label: 示例或验证方式 + description: 可提供脱敏后的命令、配置、迁移结构或验收标准。 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..dddbe33 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ +## 变更说明 + +说明为什么需要这项变更,以及它对用户或兼容性的影响。 + +## 验证 + +列出实际运行的命令、结果及未验证边界。 + +## 检查清单 + +- [ ] 变更范围聚焦,不包含无关文件或敏感信息 +- [ ] 已补充或更新回归测试 +- [ ] 已运行相关定向测试和 `./mvnw -B verify` +- [ ] 公共 API、CLI、配置或错误码变化已同步参考文档 +- [ ] 数据库兼容性结论注明真实实例、模拟或契约测试层级 +- [ ] Java 8/17 模块边界与 `flydb-core` 零运行时依赖保持不变 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..839ec27 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,32 @@ +# Changelog + +Flydb 的重要变更记录在本文件中。版本遵循语义化版本;正式发行包与发布说明见 +[GitHub Releases](https://github.com/zzxCoding/Flydb/releases)。 + +## [0.2.0] - 2026-08-14 + +首个正式公开版本,提供可用于本地开发、CI 和应用启动阶段的 Schema 迁移运行时。 + +### 新增 + +- Java 8 零第三方运行时依赖的迁移内核,以及 Java 8 CLI。 +- `migrate`、`info`、`validate`、`baseline`、`repair`、`undo`、`clean` 和 `version` 命令。 +- MySQL、PostgreSQL、Oracle、达梦 DM8、KingbaseES、openGauss、OceanBase、TiDB 方言或兼容家族。 +- Spring Boot 2.7 与 Spring Boot 3 starter。 +- 递归迁移发现、精确/范围/版本族选择、目录版本、glob/regex 路径过滤。 +- 外置 JDBC 驱动、Maven 私服解析、离线模式及 `DatabaseType` SPI。 +- 发行包内置版本匹配的文档、`AGENTS.md` 与 `flydb-cli` Agent Skill。 + +### 安全与可靠性 + +- 并发迁移锁、DDL 事务差异、失败记录阻断与恢复。 +- checksum 校验、`migrate`/`undo` dry-run、稳定退出码与错误码。 +- `clean` 默认禁用并要求双重确认;密码支持环境变量和密码文件。 + +### 当前边界 + +- GitHub Release 提供 CLI ZIP;Maven Central 和包管理器分发尚未开放。 +- Flydb 不自动把任意厂商 SQL 转换为其他数据库语法。 +- 达梦、KingbaseES、openGauss 的公开证据为方言和驱动元数据契约测试,真实环境认证仍待补充。 + +[0.2.0]: https://github.com/zzxCoding/Flydb/releases/tag/v0.2.0 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..620ddbe --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,23 @@ +# 社区行为准则 + +Flydb 社区希望所有参与者都能进行专业、友善且以事实为基础的协作。 + +## 我们鼓励 + +- 尊重不同经验、背景和观点; +- 围绕可复现行为、代码和证据讨论问题; +- 接受建设性反馈,并清楚说明假设与验证边界; +- 在发现错误时帮助修正,而不是攻击个人。 + +## 不可接受的行为 + +- 骚扰、歧视、威胁、侮辱或人身攻击; +- 未经允许公开他人的私人信息; +- 故意发布凭据、生产数据、恶意代码或误导性兼容结论; +- 持续扰乱 Issue、PR 或其他社区讨论。 + +## 执行 + +维护者可以编辑、隐藏或删除违反本准则的内容,并限制相关参与者继续互动。平台滥用或紧急人身安全问题请同时使用 GitHub 的举报渠道;安全漏洞请按[安全策略](./SECURITY.md)私下报告。 + +本准则适用于仓库的 Issue、Pull Request、Discussion、代码评审和其他官方协作空间。 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2f8e6f6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# 贡献 Flydb + +感谢你帮助改进 Flydb。本指南面向准备提交 Issue 或 Pull Request 的开发者;架构约束以 +[设计总览](./docs/design/00-overview.md)及其链接的设计文档为准。 + +## 开始之前 + +- 搜索现有 [Issues](https://github.com/zzxCoding/Flydb/issues),避免重复问题。 +- Bug 请提供 Flydb、Java、数据库和 JDBC 驱动版本,以及可复现的最小步骤。 +- 不要提交密码、带凭据的 JDBC URL、生产数据、厂商 JDBC 驱动或其他受限制品。 +- 安全漏洞不要公开建 Issue,请遵循[安全策略](./SECURITY.md)。 + +## 本地构建 + +完整 reactor 使用 JDK 17: + +```bash +./mvnw -B verify +``` + +core、CLI、Boot 2 starter 和 Boot 2 示例必须保持 Java 8 字节码。涉及这些模块或发行边界时,额外运行: + +```bash +./scripts/check-bytecode.sh 52 \ + flydb-core/target/classes flydb-cli/target/classes \ + flydb-spring-boot-2-starter/target/classes examples/boot2-demo/target/classes +./scripts/check-bytecode.sh 61 \ + flydb-spring-boot-3-starter/target/classes examples/boot3-demo/target/classes +``` + +集成测试可能启动 Docker 数据库。达梦、KingbaseES、Oracle 等授权数据库只有在你拥有合法驱动和测试实例时才能运行;提交中不得重新分发驱动。 + +## 修改约束 + +- 优先在公共边界补回归测试,再修改实现。 +- `flydb-core` 不得增加非 `test` 作用域依赖。 +- 公共 API、CLI、配置键、错误码、驱动加载或数据库支持范围发生变化时,同步更新测试和 `docs/reference`。 +- 设计契约与实现冲突时,在 PR 中说明冲突和处理方式,不要静默偏离。 +- 数据库兼容性结论必须写清验证层级;单元测试或兼容家族测试不等于厂商认证。 + +## 提交 Pull Request + +1. 从最新 `main` 创建聚焦单一目标的分支。 +2. 提交前运行相关定向测试和完整 `./mvnw -B verify`。 +3. 运行 `git diff --check`,确认没有意外文件或凭据。 +4. 在 PR 中说明变更原因、行为影响、验证命令和未验证边界。 +5. 若改变用户可见行为,同步更新中英文 README 或相应参考文档。 + +提交贡献即表示你同意按仓库的 [Apache License 2.0](./LICENSE) 提供该贡献。 diff --git a/README.en.md b/README.en.md index 1541cef..29bafc1 100644 --- a/README.en.md +++ b/README.en.md @@ -7,6 +7,7 @@ English | [中文](./README.md) # Flydb [![CI](https://github.com/zzxCoding/Flydb/actions/workflows/ci.yml/badge.svg)](https://github.com/zzxCoding/Flydb/actions/workflows/ci.yml) +[![Release](https://img.shields.io/github/v/release/zzxCoding/Flydb)](https://github.com/zzxCoding/Flydb/releases/latest) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](./LICENSE) ![Java 8+](https://img.shields.io/badge/Java-8%2B-blue) @@ -14,6 +15,8 @@ Flydb is a versioned schema migration tool for databases with JDBC drivers: buil **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. +> **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-脚本仓库按数据库家族分目录). + ## Why Flydb - **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. @@ -26,8 +29,9 @@ Flydb is a versioned schema migration tool for databases with JDBC drivers: buil Prerequisites: Java 8 or newer, an existing target database, and a Java 8-compatible JDBC driver. ```bash -unzip flydb-cli-0.2.0-SNAPSHOT.zip -cd flydb-cli-0.2.0-SNAPSHOT +curl -LO https://github.com/zzxCoding/Flydb/releases/download/v0.2.0/flydb-cli-0.2.0.zip +unzip flydb-cli-0.2.0.zip +cd flydb-cli-0.2.0 # Example: place mysql-connector-j.jar into drivers/ cp /path/to/mysql-connector-j.jar drivers/ @@ -65,7 +69,7 @@ See the [database getting-started guides](./docs/getting-started/README.md) for ## Roadmap -- [x] **Reliable migration runtime**: engine, 8 built-in dialects, CLI, Spring Boot starters, Agent Skill (current stage; official release remaining) +- [x] **Reliable migration runtime**: engine, 8 built-in dialects, CLI, Spring Boot starters, Agent Skill, and the `v0.2.0` GitHub Release - [ ] **DX and machine contract**: release and install channels, `--json` machine-readable output, CI recipes - [ ] **Agent distribution**: MCP adapter on top of a stable CLI contract - [ ] **Brownfield change intelligence**: impact analysis, application reference scanning, coverage with explicit unknowns @@ -108,10 +112,12 @@ Spring Boot applications pick the matching starter; it runs `migrate` during con com.flydb flydb-spring-boot-3-starter - 0.2.0-SNAPSHOT + 0.2.0 ``` +> The CLI is distributed through the [GitHub Release](https://github.com/zzxCoding/Flydb/releases/tag/v0.2.0). Maven Central publishing is not available yet; Java API and starter users currently build from source and install artifacts into a local or private Maven repository. + Java 8 applications use `flydb-spring-boot-2-starter` (Boot 2.7.18; [Spring states](https://spring.io/blog/2023/11/23/spring-boot-2-7-18-available-now/) that 2.7.18 is the last open-source release of the Boot 2.x line, so new projects should prefer the Boot 3 starter). The starter reuses the application's primary `DataSource` by default; set `flydb.url/user/password` to migrate with a separate DDL account, and `flydb.enabled=false` to disable auto-configuration entirely. Runnable examples: [Boot 2](./examples/boot2-demo), [Boot 3](./examples/boot3-demo); see the [Spring Boot starter design](./docs/design/07-spring-boot-starter.md). ## Names and configuration @@ -150,7 +156,7 @@ The full reactor, including the Boot 3 modules, is built with Java 17; the Boot ./mvnw verify ``` -The CLI distribution is generated at `flydb-cli/target/flydb-cli-0.2.0-SNAPSHOT.zip`. The core module enforces an 80% JaCoCo line-coverage gate and zero non-test runtime dependencies via Maven Enforcer. +The CLI distribution is generated at `flydb-cli/target/flydb-cli-0.2.0.zip`. The core module enforces an 80% JaCoCo line-coverage gate and zero non-test runtime dependencies via Maven Enforcer. Local integration contracts default to MySQL 8 only; to run a specific CI dialect, set `-Pmysql`/`-Ppostgresql` and `-Dflydb.integration.database=`. The full matrix runs in `.github/workflows/ci.yml`. @@ -172,7 +178,7 @@ Local integration contracts default to MySQL 8 only; to run a specific CI dialec ## Contributing -Issues and PRs are welcome. Before submitting, run `./mvnw -B verify` so tests and coverage gates pass; changes touching CLI behavior, configuration keys, or error codes must update `docs/reference` accordingly, and the Skill references in `flydb-skills` should be re-checked. Start with the [design overview](./docs/design/00-overview.md) for architecture and design documents. +Issues and PRs are welcome. See the [contributing guide](./CONTRIBUTING.md) for the full workflow, and run `./mvnw -B verify` before submitting. Report vulnerabilities privately through the process in the [security policy](./SECURITY.md), not in a public issue. Start with the [design overview](./docs/design/00-overview.md) for architecture and design documents. ## License diff --git a/README.md b/README.md index c15ac21..f74541b 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ # Flydb [![CI](https://github.com/zzxCoding/Flydb/actions/workflows/ci.yml/badge.svg)](https://github.com/zzxCoding/Flydb/actions/workflows/ci.yml) +[![Release](https://img.shields.io/github/v/release/zzxCoding/Flydb)](https://github.com/zzxCoding/Flydb/releases/latest) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](./LICENSE) ![Java 8+](https://img.shields.io/badge/Java-8%2B-blue) @@ -14,6 +15,8 @@ Flydb 是面向任意支持 JDBC 驱动的数据库的 Schema 版本化迁移工 **现在**,Flydb 0.2 是一个可靠的迁移运行时:`migrate`、`info`、`validate`、`baseline`、`repair`、`undo`、`clean` 等命令,配合并发锁、事务语义、checksum 校验、失败阻断与恢复,内置主流与信创共 8 个数据库方言,并提供 Spring Boot 2/3 starter。**长期方向**,是让人类与 AI Agent 共用同一套安全的数据库变更能力:Agent 决定“改什么”,Flydb 保证“怎么改是安全的”。各阶段目标与当前进度见[路线图](./ROADMAP.md)。 +> **能力边界:** Flydb 负责迁移版本、执行安全与数据库方言适配,不会把任意一套厂商 SQL 自动转换成所有数据库语法。存在方言差异时,请按数据库家族维护迁移目录,具体组织方式见[多环境自动化指南](./docs/getting-started/multi-environment.md#4-脚本仓库按数据库家族分目录)。 + ## 为什么选 Flydb - **信创数据库一等公民**:达梦 DM8、人大金仓 KingbaseES、openGauss、OceanBase、TiDB 与 MySQL、PostgreSQL、Oracle 同为内置方言;CLI 不捆绑厂商驱动,从 `drivers/`、运行时 classpath 或 Maven 私服外置解析加载,适配不能公开分发的驱动。 @@ -26,8 +29,9 @@ Flydb 是面向任意支持 JDBC 驱动的数据库的 Schema 版本化迁移工 前置条件:Java 8 或更高版本、一个已创建的目标数据库,以及与 Java 8 兼容的 JDBC 驱动。 ```bash -unzip flydb-cli-0.2.0-SNAPSHOT.zip -cd flydb-cli-0.2.0-SNAPSHOT +curl -LO https://github.com/zzxCoding/Flydb/releases/download/v0.2.0/flydb-cli-0.2.0.zip +unzip flydb-cli-0.2.0.zip +cd flydb-cli-0.2.0 # 示例:把 mysql-connector-j.jar 放入 drivers/ cp /path/to/mysql-connector-j.jar drivers/ @@ -65,7 +69,7 @@ bin/flydb validate ## 路线图 -- [x] **可靠的迁移运行时**:迁移引擎、8 个内置方言、CLI、Spring Boot starter、Agent Skill(当前阶段,余正式发布) +- [x] **可靠的迁移运行时**:迁移引擎、8 个内置方言、CLI、Spring Boot starter、Agent Skill、`v0.2.0` GitHub Release - [ ] **开发体验与机器契约**:发布与安装渠道、`--json` 机器输出、CI 集成方案 - [ ] **Agent 分发**:基于稳定 CLI 契约的 MCP 适配 - [ ] **存量变更智能**:影响分析、应用引用扫描、覆盖率与未知项标注 @@ -108,10 +112,12 @@ Spring Boot 应用选择对应 starter,容器初始化期间执行 `migrate` com.flydb flydb-spring-boot-3-starter - 0.2.0-SNAPSHOT + 0.2.0 ``` +> CLI 已通过 [GitHub Release](https://github.com/zzxCoding/Flydb/releases/tag/v0.2.0) 分发;Maven Central 尚未发布。Java API 与 starter 用户当前需从源码构建并安装到本地或企业 Maven 仓库。 + Java 8 存量应用改用 `flydb-spring-boot-2-starter`(Boot 2.7.18;[Spring 官方已说明](https://spring.io/blog/2023/11/23/spring-boot-2-7-18-available-now/) 2.7.18 是 Boot 2.x 最后一个开源支持版本,因此新项目应优先 Boot 3 starter)。默认复用应用主 `DataSource`;需要权限隔离时设置 `flydb.url/user/password`,用独立 DDL 账号迁移;`flydb.enabled=false` 可完全关闭自动装配。可运行示例:[Boot 2 示例](./examples/boot2-demo)、[Boot 3 示例](./examples/boot3-demo),详见 [Spring Boot Starter 设计](./docs/design/07-spring-boot-starter.md)。 ## 命名与配置 @@ -150,7 +156,7 @@ bin/flydb clean --clean-disabled=false --force # clean 默认禁用;非交 ./mvnw verify ``` -CLI 构建产物位于 `flydb-cli/target/flydb-cli-0.2.0-SNAPSHOT.zip`。core 的 JaCoCo 行覆盖率门禁为 80%,并由 Maven Enforcer 保证零非测试运行时依赖。 +CLI 构建产物位于 `flydb-cli/target/flydb-cli-0.2.0.zip`。core 的 JaCoCo 行覆盖率门禁为 80%,并由 Maven Enforcer 保证零非测试运行时依赖。 本地集成契约默认只启动 MySQL 8;需要显式运行某个 CI 方言项时设置 `-Pmysql`/`-Ppostgresql` 与 `-Dflydb.integration.database=`,完整矩阵由 `.github/workflows/ci.yml` 执行。 @@ -172,7 +178,7 @@ CLI 构建产物位于 `flydb-cli/target/flydb-cli-0.2.0-SNAPSHOT.zip`。core ## 参与贡献 -欢迎通过 Issue 和 PR 参与贡献。提交前请运行 `./mvnw -B verify` 保证测试与覆盖率门禁通过;涉及 CLI 行为、配置键或错误码的改动,请同步更新 `docs/reference` 并检查 `flydb-skills` 中的 Skill 引用是否仍然有效。架构与设计文档入口见[设计总览](./docs/design/00-overview.md)。 +欢迎通过 Issue 和 PR 参与贡献。完整流程见[贡献指南](./CONTRIBUTING.md);提交前请运行 `./mvnw -B verify` 保证测试与覆盖率门禁通过。安全问题请按[安全策略](./SECURITY.md)私下报告,不要在公开 Issue 中披露漏洞细节。架构与设计文档入口见[设计总览](./docs/design/00-overview.md)。 ## 许可证 diff --git a/ROADMAP.md b/ROADMAP.md index ca8b431..32daaef 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -14,7 +14,8 @@ - [x] MySQL、PostgreSQL、Oracle、达梦 DM8、KingbaseES、openGauss、OceanBase、TiDB 内置方言与 `DatabaseType` SPI - [x] Spring Boot 2 / 3 starter 与可运行示例 - [x] `flydb-cli` Agent Skill 与评测用例 -- [ ] 0.2 正式发布与分发渠道(包管理器、中央仓库),兼容性矩阵公开化 +- [x] `v0.2.0` GitHub Release 与 CLI 发行包 +- [ ] 包管理器、Maven Central 等安装渠道,兼容性矩阵公开化 ## 阶段二:开发体验与机器契约 diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..9ef6031 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,28 @@ +# 安全策略 + +## 支持范围 + +| 版本 | 安全修复 | +|---|---| +| 0.2.x | 支持 | +| 早期原型版本 | 不支持 | + +安全修复优先进入最新的 0.2.x 版本。未来版本发布后,本表会同步更新。 + +## 私下报告漏洞 + +请使用仓库 **Security** 页面中的 **Report a vulnerability** 提交私密报告,不要公开创建 Issue,也不要在日志或示例中附带真实密码、令牌、JDBC URL 凭据或生产数据。 + +报告请尽量包含: + +- 受影响版本、模块与运行环境; +- 可复现的最小步骤或概念验证; +- 可能的影响和攻击前提; +- 已知的缓解措施; +- 是否存在公开披露计划。 + +维护者确认问题后会通过 GitHub 私密安全通道协作修复与披露。在补丁和升级建议可用之前,请勿公开漏洞细节。 + +## 不属于漏洞的情况 + +一般使用问题、数据库兼容性问题和功能建议请使用普通 [Issues](https://github.com/zzxCoding/Flydb/issues)。请先删除日志中的密码、令牌、连接串凭据和业务数据。 diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..5cb21ef --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,11 @@ +# 获取帮助 + +使用 Flydb 前请先阅读: + +- [README](./README.md):定位能力、快速开始和支持范围; +- [数据库上手指南](./docs/getting-started/README.md):驱动、连接、权限与已知限制; +- [命令参考](./docs/reference/commands.md)、[配置参考](./docs/reference/configuration.md)和[错误码参考](./docs/reference/errors.md)。 + +仍无法解决时,请创建 [Issue](https://github.com/zzxCoding/Flydb/issues/new/choose),并提供 Flydb、Java、数据库和 JDBC 驱动版本、脱敏后的配置来源、实际命令、退出码及最小复现步骤。 + +不要粘贴密码、令牌、完整生产连接串或业务数据。安全漏洞请按[安全策略](./SECURITY.md)私下报告。 diff --git a/docs/assets/flydb-social-preview.png b/docs/assets/flydb-social-preview.png new file mode 100644 index 0000000..2fed78b Binary files /dev/null and b/docs/assets/flydb-social-preview.png differ diff --git a/docs/design/09-implementation-plan.md b/docs/design/09-implementation-plan.md index 9ced2ba..1c1a37b 100644 --- a/docs/design/09-implementation-plan.md +++ b/docs/design/09-implementation-plan.md @@ -23,7 +23,7 @@ ### 阶段 1:工程骨架 + 领域模型(依赖:[01](01-modules.md)、[02](02-domain-api.md)) 1. **清理旧代码**:删除 `src/`、`flydb.sh`、`logs/`、`target/`;保留 `LICENSE`(Apache-2.0)、`NOTICE`、`mvnw*`;`README.md` 暂留(阶段 8 重写)。 -2. **搭多模块骨架**:根 POM(`revision` 统一版本 0.2.0-SNAPSHOT、compiler release 8、enforcer 零依赖规则、JaCoCo 门禁)+ 5 个子模块空壳([01 §1](01-modules.md) 表)。 +2. **搭多模块骨架**:根 POM(`revision` 统一管理版本、compiler release 8、enforcer 零依赖规则、JaCoCo 门禁)+ 5 个子模块空壳([01 §1](01-modules.md) 表)。 3. **领域模型(TDD)**,全部在 `flydb-core`: - `MigrationVersion`([02 §3](02-domain-api.md))→ 测试:`MigrationVersionTest`([08 §1](08-testing-roadmap.md) 用例清单) - `MigrationType` / `MigrationState` / `ResolvedMigration` / `AppliedMigration`([02 §4/§6](02-domain-api.md)) diff --git a/docs/getting-started/jdbc-integration.md b/docs/getting-started/jdbc-integration.md index b97e45a..f8c4ce4 100644 --- a/docs/getting-started/jdbc-integration.md +++ b/docs/getting-started/jdbc-integration.md @@ -34,8 +34,8 @@ CLI 不捆绑厂商驱动。启动时先扫描安装目录下的 `drivers/*.jar` 下面以一个使用 MySQL 兼容语法、但 URL 和驱动类均为厂商自定义的数据库为例。这里的 `vendor`、`vendor.jdbc.Driver` 只是占位符,请替换为厂商实际值: ```bash -unzip flydb-cli-0.2.0-SNAPSHOT.zip -cd flydb-cli-0.2.0-SNAPSHOT +unzip flydb-cli-0.2.0.zip +cd flydb-cli-0.2.0 cp /path/to/vendor-jdbc.jar drivers/ @@ -94,7 +94,7 @@ bin/flydb init --url 'jdbc:oceanbase://db.example.com:2883/app' \ 没有合适的内置方言时,把两个 JAR 放入同一个目录: ```text -flydb-cli-0.2.0-SNAPSHOT/ +flydb-cli-0.2.0/ └── drivers/ ├── vendor-jdbc.jar └── flydb-dialect-vendorx.jar diff --git a/flydb-cli/src/main/java/com/flydb/cli/FlydbCli.java b/flydb-cli/src/main/java/com/flydb/cli/FlydbCli.java index fdc1179..8bff25a 100644 --- a/flydb-cli/src/main/java/com/flydb/cli/FlydbCli.java +++ b/flydb-cli/src/main/java/com/flydb/cli/FlydbCli.java @@ -594,7 +594,7 @@ private static String redactSecret(String text, String password) { private static String version() { Package pkg = FlydbCli.class.getPackage(); String implementation = pkg == null ? null : pkg.getImplementationVersion(); - return implementation != null ? implementation : "0.2.0-SNAPSHOT"; + return implementation != null ? implementation : "0.2.0"; } private static Path detectInstallDirectory() { diff --git a/flydb-cli/src/test/java/com/flydb/cli/FlydbCliTest.java b/flydb-cli/src/test/java/com/flydb/cli/FlydbCliTest.java index 8673e58..16f3959 100644 --- a/flydb-cli/src/test/java/com/flydb/cli/FlydbCliTest.java +++ b/flydb-cli/src/test/java/com/flydb/cli/FlydbCliTest.java @@ -39,7 +39,7 @@ void versionCommandReturnsSuccess() { int exitCode = cli.execute("version"); assertThat(exitCode).isZero(); - assertThat(standardOutput.toString()).contains("flydb 0.2.0-SNAPSHOT"); + assertThat(standardOutput.toString()).contains("flydb 0.2.0"); assertThat(errorOutput.toString()).isEmpty(); } diff --git a/flydb-skills/README.md b/flydb-skills/README.md index d7e7982..ccc0d53 100644 --- a/flydb-skills/README.md +++ b/flydb-skills/README.md @@ -58,7 +58,7 @@ Flydb 的 Agent Skills 集合。Skill 负责把重复的操作流程交给 Agent 在仓库根目录执行: ```bash -python3 /Users/xuan/.agents/skills/skill-creator/scripts/quick_validate.py \ +python3 "${HOME}/.agents/skills/skill-creator/scripts/quick_validate.py" \ flydb-skills/skills/flydb-cli ``` diff --git a/pom.xml b/pom.xml index aee5cce..1432a36 100644 --- a/pom.xml +++ b/pom.xml @@ -28,8 +28,32 @@ + + + zzxcoding + https://github.com/zzxCoding + + + + + scm:git:https://github.com/zzxCoding/Flydb.git + scm:git:ssh://git@github.com/zzxCoding/Flydb.git + https://github.com/zzxCoding/Flydb/tree/main + HEAD + + + + GitHub Issues + https://github.com/zzxCoding/Flydb/issues + + + + GitHub Actions + https://github.com/zzxCoding/Flydb/actions + + - 0.2.0-SNAPSHOT + 0.2.0 UTF-8 UTF-8