ワンクリックで
migrate
Create and manage database migrations using goose. Use for schema changes, new tables, or index optimization.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create and manage database migrations using goose. Use for schema changes, new tables, or index optimization.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Run Go benchmarks and compare results to detect performance regressions. Use before and after performance-related changes.
Run pre-push quality checks (vet + lint + tests with race detector). Use before pushing code.
Run tests with coverage analysis and identify untested code paths. Use to find gaps before releases.
Check and tidy Go module dependencies. Use after adding/removing imports or before releases.
Run go generate to build templ templates and frontend assets. Use after changing templates or CSS/JS.
Run integration tests that require Docker (Postgres, MinIO via testcontainers). Use to validate database and storage behavior.
| name | migrate |
| description | Create and manage database migrations using goose. Use for schema changes, new tables, or index optimization. |
| disable-model-invocation | true |
| argument-hint | create|up|down|status|validate name |
Create, run, and validate database migrations using goose.
/migrate create add_user_preferences - Create new migration/migrate up - Run pending migrations/migrate down - Rollback last migration/migrate status - Show migration status/migrate validate - Validate migrations and GORM modelsCreate a new migration file.
Generate migration file
goose -dir migrations create $1 sql
Open the created file and add template:
-- +goose Up
-- +goose StatementBegin
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
-- +goose StatementEnd
Remind about migration rules:
Run all pending migrations.
Ensure binary is current
go install ./...
Check current status
veloria migrate status
Run migrations
veloria migrate up
Verify success
veloria migrate status
Rollback the last migration.
Show current status to confirm which migration will be rolled back
Run rollback
veloria migrate down
Verify rollback by checking status again
Show current migration status.
veloria migrate status
Display:
Validate migrations and check GORM model alignment.
List all migration files
ls -la migrations/*.sql
Read each migration and check for:
Read GORM models in internal/repo/:
plugin.go - Plugin modeltheme.go - Theme modelcore.go - Core modelCompare schema
Report findings
## Migration Validation Report
### Migrations
| File | UP | DOWN | Status |
|------|----|----- |--------|
### Model Alignment
| Model | Table | Issues |
|-------|-------|--------|
### Recommendations
- [specific issues found]
Add indexes for:
user_id, plugin_id)slug, status)created_at, active_installs)Example:
-- +goose Up
CREATE INDEX idx_searches_user_status ON searches(user_id, status);
-- +goose Down
DROP INDEX idx_searches_user_status;
Current schema includes:
users - User accounts with OAuthplugins - WordPress plugin metadatathemes - WordPress theme metadatacores - WordPress core releasessearches - Search history and resultsoauth_identities - OAuth provider credentialssessions - User sessionslargest_repo_files - File size statisticsReview existing migrations in migrations/ before creating new ones.