@indiekitai/pg-dash 0.3.7 → 0.3.9

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 CHANGED
@@ -102,7 +102,7 @@ The Dashboard is there when you need it. But the real power is in the CLI, MCP,
102
102
 
103
103
  ### 🛡️ Migration Safety Check
104
104
  - Analyze a migration SQL file for risks before running it
105
- - Detects: `CREATE INDEX` without `CONCURRENTLY` (lock risk), `ADD COLUMN NOT NULL` without `DEFAULT`, `DROP TABLE`, `TRUNCATE`, `DELETE`/`UPDATE` without `WHERE`
105
+ - Detects: `CREATE INDEX` without `CONCURRENTLY` (lock risk), `ADD COLUMN NOT NULL` without `DEFAULT`, `ALTER COLUMN TYPE` (full table rewrite), `DROP COLUMN` (app breakage risk), `ADD CONSTRAINT` without `NOT VALID` (full table scan), `CREATE INDEX CONCURRENTLY` inside a transaction (runtime failure), `DROP TABLE`, `TRUNCATE`, `DELETE`/`UPDATE` without `WHERE`
106
106
  - Dynamic checks: connects to DB to verify referenced tables exist, estimates lock time based on actual row counts
107
107
  - CI-ready: `--ci` flag emits `::error::` / `::warning::` GitHub Actions annotations
108
108
 
@@ -113,7 +113,7 @@ The Dashboard is there when you need it. But the real power is in the CLI, MCP,
113
113
 
114
114
  ### 🔄 Multi-Env Diff
115
115
  - Compare schema and health between two PostgreSQL environments (local vs staging, staging vs prod)
116
- - Detects: missing/extra tables, missing/extra columns, column type mismatches, missing/extra indexes
116
+ - Detects: missing/extra tables, missing/extra columns, column type mismatches, missing/extra indexes, **foreign key and CHECK constraints**, **enum type differences**
117
117
  - `--health` flag adds health score comparison and unique issues per environment
118
118
  - `pg_dash_compare_env` MCP tool: ask your AI "what's different between local and staging?"
119
119
 
package/README.zh-CN.md CHANGED
@@ -102,7 +102,7 @@ Dashboard 需要时可以用。但真正的核心能力在 CLI、MCP 和 CI。
102
102
 
103
103
  ### 🛡️ Migration 安全检查
104
104
  - 执行迁移前分析 SQL 文件的风险
105
- - 检测:`CREATE INDEX`(无 `CONCURRENTLY` 会锁表)、`ADD COLUMN NOT NULL`(无 DEFAULT 会失败)、`DROP TABLE`、`TRUNCATE`、无 WHERE 的 `DELETE`/`UPDATE`
105
+ - 检测:`CREATE INDEX`(无 `CONCURRENTLY` 会锁表)、`ADD COLUMN NOT NULL`(无 DEFAULT 会失败)、`ALTER COLUMN TYPE`(全表重写)、`DROP COLUMN`(可能 break 代码)、`ADD CONSTRAINT` 无 `NOT VALID`(全表扫描验证)、`CREATE INDEX CONCURRENTLY` 在事务内(运行时必然失败)、`DROP TABLE`、`TRUNCATE`、无 WHERE 的 `DELETE`/`UPDATE`
106
106
  - 动态检查:连接数据库验证被引用表是否存在,根据实际行数估算锁表时间
107
107
  - CI 友好:`--ci` 输出 `::error::` / `::warning::` GitHub Actions 注解
108
108
 
@@ -113,7 +113,7 @@ Dashboard 需要时可以用。但真正的核心能力在 CLI、MCP 和 CI。
113
113
 
114
114
  ### 🔄 多环境对比
115
115
  - 对比两个 PostgreSQL 环境的 Schema 和健康状态(本地 vs 预发、预发 vs 生产)
116
- - 检测:缺失/多余的表、缺失/多余的列、列类型不匹配、缺失/多余的索引
116
+ - 检测:缺失/多余的表、缺失/多余的列、列类型不匹配、缺失/多余的索引、**外键和 CHECK 约束差异**、**枚举类型差异**
117
117
  - `--health` 参数额外对比健康分和各环境独有的问题
118
118
  - `pg_dash_compare_env` MCP 工具:直接问 AI "本地和预发有什么差异?"
119
119