📦 migratesafe — 技能工具

v1.0.0

Database migration safety checker — catches destructive migrations before they reach production

0· 0·0 当前·0 累计
0

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install migratesafe
镜像加速npx clawhub@latest install migratesafe --registry https://cn.longxiaskill.com

技能文档

Database migration safety checker — catches destructive migrations before they reach production.

Features

  • Destructive Migration Detection: Identifies dangerous operations like DROP TABLE, TRUNCATE, column/table deletions
  • CI/CD Integration: Easily integrate into your continuous deployment pipeline
  • Detailed Reports: Provides clear, actionable feedback on migration safety issues
  • Pre-deployment Checks: Run checks before any migration reaches production

Usage

# Check a migration file
migratesafe check migration.sql

# Check multiple files migratesafe check migrations/

# Output detailed report migratesafe check migration.sql --verbose

Supported Operations

  • DROP TABLE / DROP COLUMN
  • TRUNCATE
  • DELETE without WHERE clause
  • ALTER TABLE with destructive changes
  • Data loss warnings

Integration Example

# .github/workflows/migrate.yml
name: Migration Safety Check
on: [push]
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run MigrateSafe
        run: migratesafe check db/migrations/
数据来源ClawHub ↗ · 中文优化:龙虾技能库