dbgov-cli 0.1.11 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | [中文](README_zh.md)
|
|
4
4
|
|
|
5
|
-
Governed MySQL operations CLI for AI agents and operators. It provides read queries, schema planning and apply, governed DML, GitOps import/reconcile/rollback, audit, RBAC, and local credential management.
|
|
5
|
+
Governed MySQL and PostgreSQL operations CLI for AI agents and operators. It provides read queries, schema planning and apply, governed DML, GitOps import/reconcile/rollback, audit, RBAC, and local credential management.
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
`dbgov` is built around a governance spine: connect to MySQL, classify risk, require explicit authorization for writes, execute through backend interfaces, and write structured audit events.
|
|
9
|
+
`dbgov` is built around a governance spine: connect to MySQL or PostgreSQL, classify risk, require explicit authorization for writes, execute through backend interfaces, and write structured audit events.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -67,6 +67,8 @@ dbgov-cli rollback list -o json
|
|
|
67
67
|
dbgov-cli audit query --since 24h -o json
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
Schema management normalizes auto-increment columns as a boolean `autoIncrement` model across MySQL and PostgreSQL. It preserves create, introspect, diff, apply, snapshot, and rollback behavior, but intentionally does not preserve PostgreSQL `serial` vs identity, `ALWAYS` vs `BY DEFAULT`, or sequence start/increment options.
|
|
71
|
+
|
|
70
72
|
## Configuration and Contexts
|
|
71
73
|
|
|
72
74
|
Contexts live under `~/.dbgov`. Use `ctx set`, `ctx use`, `ctx current`, and `ctx list` to manage them. Credentials may be literal during setup, read from `DBGOV_PASSWORD`, or migrated to secure backends:
|
|
@@ -84,7 +86,7 @@ Set `DBGOV_OPERATOR` in CI to make audit and RBAC identity stable.
|
|
|
84
86
|
|
|
85
87
|
## Rollback and Snapshots
|
|
86
88
|
|
|
87
|
-
Schema mutations capture a pre-change DDL snapshot before execution. `rollback --to <snapshot>` restores structure only; MySQL data dropped by table or column deletion is not recovered. dbgov prints this warning during rollback planning and execution.
|
|
89
|
+
Schema mutations capture a pre-change DDL snapshot before execution. `rollback --to <snapshot>` restores structure only; MySQL and PostgreSQL data dropped by table or column deletion is not recovered. dbgov prints this warning during rollback planning and execution.
|
|
88
90
|
|
|
89
91
|
## Build from Source
|
|
90
92
|
|
|
@@ -95,7 +97,7 @@ gofmt -l main.go cmd internal
|
|
|
95
97
|
golangci-lint run --timeout=5m
|
|
96
98
|
```
|
|
97
99
|
|
|
98
|
-
MySQL integration tests are opt-in with `DBGOV_TEST_MYSQL_DSN`.
|
|
100
|
+
MySQL and PostgreSQL integration tests are opt-in with `DBGOV_TEST_MYSQL_DSN` and `DBGOV_TEST_POSTGRES_DSN`.
|
|
99
101
|
|
|
100
102
|
## AI Skill
|
|
101
103
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbgov-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Governed MySQL operations CLI for AI agents",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Governed MySQL and PostgreSQL operations CLI for AI agents",
|
|
5
5
|
"bin": {
|
|
6
6
|
"dbgov": "bin/dbgov-cli.js",
|
|
7
7
|
"dbgov-cli": "bin/dbgov-cli.js"
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"keywords": [
|
|
19
19
|
"database",
|
|
20
20
|
"mysql",
|
|
21
|
+
"postgresql",
|
|
21
22
|
"cli",
|
|
22
23
|
"ai",
|
|
23
24
|
"governance"
|