بنقرة واحدة
db-schema-mgmt
Rules that MUST be followed when working on database schema related tasks with Atlas and GORM.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Rules that MUST be followed when working on database schema related tasks with Atlas and GORM.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Comprehensive Atlas database schema management. Use when working with Atlas migrations, schema inspection, diffing, linting, or applying database changes.
A test skill that greets the user. Use when the user says hello or asks for a greeting.
| name | db-schema-mgmt |
| description | Rules that MUST be followed when working on database schema related tasks with Atlas and GORM. |
This project uses Atlas for database schema management with GORM models.
When the schema changes, generate a new migration:
atlas migrate diff --env gorm <migration_name>
| Task | Command |
|---|---|
| Generate migration | atlas migrate diff --env gorm <name> |
| Validate migrations | atlas migrate validate --env gorm |
| Check status | atlas migrate status --env gorm |
| Fix checksums | atlas migrate hash --env gorm |
models/ directoryatlas migrate diff --env gorm add_description_fieldmigrations/atlas migrate validate --env gormgo test ./...⚠️ NEVER modify existing migration files - this breaks linear history
⚠️ ALWAYS create NEW migrations for schema changes
⚠️ Run atlas migrate hash if you must edit an unapplied migration
atlas migrate validate --env gorm
# Fix issues, then:
atlas migrate hash --env gorm
├── atlas.hcl # Atlas configuration
├── models/ # GORM models (source of truth)
│ └── todos.go
├── migrations/ # Atlas versioned migrations
│ ├── atlas.sum # Integrity checksums (don't edit)
│ └── *.sql # Migration files
The atlas.hcl uses atlas-provider-gorm to read GORM model definitions and compare them against the migrations directory.