database-migration
CommunityManage schema changes, safely and swiftly.
Authorfattits30-dev
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill automates and secures database schema management, eliminating the risks of manual changes, data loss, or corruption. It ensures safe evolution of your SQLite database, especially with encrypted fields and complex rollback scenarios.
Core Features & Use Cases
- Automated Migration Generation: Creates Drizzle ORM migrations for schema changes (e.g., adding columns, new tables).
- Safe Rollbacks: Supports reverting to previous database states with automatic pre-migration backups.
- Encryption-Aware: Manages schema changes while respecting and protecting 11 encrypted database fields.
- Use Case: When you need to add a new column to a table, Claude generates the migration, automatically backs up your database, applies the changes, and ensures encrypted fields remain secure, preventing data integrity issues.
Quick Start
1. Modify your schema in src/db/schema.ts
(e.g., add a new column to the 'cases' table)
2. Generate a new migration file based on schema changes
pnpm db:generate
3. Review the generated SQL for safety and correctness
4. Apply the migration (an automatic backup will be created first)
pnpm db:migrate
If needed, rollback the last migration to revert changes
pnpm db:migrate:rollback
Dependency Matrix
Required Modules
drizzle-ormbetter-sqlite3tsx
Components
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: database-migration Download link: https://github.com/fattits30-dev/Justice-Companion/archive/main.zip#database-migration Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.