Run database migrations safely with rollback verification
Creates a new database migration, runs it, and verifies it can be rolled back safely. This ensures all migrations are reversible and the schema stays consistent.
/db-migrate AddRoleToProfiles # Generate and run a migration
/db-migrate CreateExperiences # Generate a create table migration
/db-migrate --run # Run all pending migrations
/db-migrate --rollback # Roll back the last migration
/db-migrate --status # Show migration status
Generate the migration. Based on the migration name and context, generate an appropriate migration file:
bundle exec rails generate migration <MigrationName>
Edit the migration. Open the generated migration file and add the appropriate schema changes based on the naming convention and user instructions:
AddXToY - adds columns to existing tableRemoveXFromY - removes columns from existing tableCreateX - creates a new tableAddIndexToX - adds indicesRun the migration.
rails db:migrate
Verify rollback. Immediately test that the migration is reversible:
rails db:rollback STEP=1
Re-run the migration. Apply the migration again after successful rollback:
rails db:migrate
Verify schema. Check that db/schema.rb reflects the expected changes.
Report results.
## Migration Results
**Migration:** db/migrate/YYYYMMDDHHMMSS_migration_name.rb
**Status:** SUCCESS | FAILED
**Forward:** Applied successfully
**Rollback:** Reversible (verified)
**Schema:** Updated correctly
self.ignored_columns)disable_ddl_transaction!
and algorithm: :concurrently.change method (not up/down) whenever possible for automatic
reversibility.rails db:rollback if needed.db/schema.rb has conflicts, report them for manual resolution.Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer