diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-01-16 08:30:14 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-01-16 08:30:14 +0900 |
| commit | 3fbb9a18372f2b6a675dd6c039ba52be76f3eeb4 (patch) | |
| tree | aa694a36cdd323a7853672ee7a2ba60409ac3b06 /databases/drizzle/.claude/commands | |
updates
Diffstat (limited to 'databases/drizzle/.claude/commands')
| -rw-r--r-- | databases/drizzle/.claude/commands/migrate.md | 23 | ||||
| -rw-r--r-- | databases/drizzle/.claude/commands/schema.md | 18 |
2 files changed, 41 insertions, 0 deletions
diff --git a/databases/drizzle/.claude/commands/migrate.md b/databases/drizzle/.claude/commands/migrate.md new file mode 100644 index 0000000..0c7a06f --- /dev/null +++ b/databases/drizzle/.claude/commands/migrate.md @@ -0,0 +1,23 @@ +--- +description: Handle Drizzle migrations (generate, push, rollback) +argument-hint: "[generate|push|rollback|status]" +allowed-tools: Bash, Read, Write +--- + +Handle Drizzle migrations: $ARGUMENTS + +Available actions: + +- **generate** - Generate migration from schema changes +- **push** - Push schema changes to database +- **rollback** - Rollback last migration +- **status** - Check migration status + +Steps: + +1. Check current migration status +2. Execute the requested migration action +3. Verify the operation completed successfully +4. Show resulting database state + +Always backup production data before running migrations. diff --git a/databases/drizzle/.claude/commands/schema.md b/databases/drizzle/.claude/commands/schema.md new file mode 100644 index 0000000..c038b06 --- /dev/null +++ b/databases/drizzle/.claude/commands/schema.md @@ -0,0 +1,18 @@ +--- +description: Generate type-safe Drizzle schema for a table +argument-hint: "[table-name] [database-type]" +allowed-tools: Write, Read, Edit +--- + +Generate a complete Drizzle ORM schema for the table "$ARGUMENTS". + +Follow these requirements: + +1. Use proper TypeScript types and imports +2. Include appropriate indexes for performance +3. Add relationships if referenced tables exist +4. Include proper constraints and validations +5. Generate both insert and select type exports +6. Follow Drizzle naming conventions + +If no table name is provided, show available schema patterns and examples. |
