SuperAPI AI 工具集

pscale-database

数据与分析

查看项目

更新于 10-16 07:17

技能介绍

用途:通过 pscale CLI 管理 PlanetScale 数据库与 Vitess keyspace,包括创建、查看、更新、删除数据库,以及外部 MySQL keyspace、区域、设置、迁移节流与 PostgreSQL IP 限制等。

主要能力:数据库生命周期(list/create/show/update/delete);数据库级 Vitess 迁移节流(throttler show/update,ratio 0-95);数据库级 aggressive cutover(show/enable/disable);PostgreSQL IP 限制(list/create/show/update/delete);Vitess 只读区域(regions list、read-only-regions list/add/update/remove);从只读区域 dump;keyspace 设置查看与删除;create-external 连接外部 MySQL。

使用方式:常用命令如 pscale database list --org <org>、pscale database create <database> --org <org>、pscale database show <database> --format json。布尔标志需显式赋值,如 --require-approval-for-deploy=true。非交互查询用 pscale sql <database> <branch> --org <org> --format json --query '<sql>',其逻辑库标志为 --dbname。shell 需交互终端与本地 psql;无 TTY 时除非设置 PSCALE_ALLOW_NONINTERACTIVE_SHELL 否则失败。

适用场景:数据库创建与发现、设置调整、Vitess 迁移节流与切换策略、PostgreSQL 访问控制、只读区域管理与 dump、外部 MySQL keyspace 接入。

限制:Vitess 专属命令会拒绝 PostgreSQL 数据库;--read-only-region 不能与 --replica/--rdonly 同用;keyspace 删除具破坏性,非交互需 --force;create-external 需在同一可信 shell 注入 SOURCE_PASSWORD,建议先 --dry-run 并校验 can_connect、lint_errors 等字段;dump 失败按不完整处理,勿恢复部分输出。Neki 专属拓扑、分片、路由等流程不在本技能范围。具体收费、价格与效果资料暂未提供。