database schema migrations
- Repo stars 0
- Author repo skills-registry
- Domain
- Data
- Author-declared agents
- No explicit declaration found; this is not inferred or tested compatibility
- Static check
- 88 / 100 · heuristic scan, not runtime safety proof
- Runtime evidence
- Not run; no isolated runtime test evidence is currently recorded
- Author / version / license
- @tomevault-io · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No explicit requirements detected
- Detected file/system behavior
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- None (reference only)
Heads up: Tool permissions are not declared; actual access depends on the runtime.
# Database Schema Migrations
Manage schema design, migrations, and database operations.
## Key Responsibilities
- Design and version schema changes.
- Write migration scripts.
- Ensure database compatibility.
- Provide rollback-safe migration steps.
## Migration Pattern
```sql
-- Good: Idempotent migration
CREATE TABLE IF NOT EXISTS resources (
id TEXT PRIMARY KEY,
title TEXT NOT NULL,
owner_id TEXT NOT NULL,
created_at INTEGER DEFAULT (unixepoch())
);
-- Good: Safe index addition
CREATE INDEX IF NOT EXISTS idx_resources_owner ON resources(owner_id);
```
## Naming Convention
- Migration files: `YYYYMMDD_description.sql`
- Tables: snake_case, plural (e.g., `resources`, `permissions`)
- Columns: snake_case (e.g., `resource_id`, `created_at`)
## Constraints
- Migrations must be idempotent and reversible.
- Indexes must be added in a way that doesn't break existing queries.
- Use timestamp-prefixed filenames.
- Always provide rollback scripts.
## Checklist
- [ ] Migration is idempotent (can run multiple times safely).
- [ ] Rollback migration tested.
- [ ] Indexes use `IF NOT EXISTS`.
- [ ] Foreign keys defined where applicable.
- [ ] Migration logged in migration history table.
## References
- `references/migration-patterns.md` - Common migration patterns by database type
- `references/rollback-strategies.md` - Safe rollback strategies
---
> Source: [d-o-hub/github-template-ai-agents](https://github.com/d-o-hub/github-template-ai-agents) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->
Sections and files
Listed in source order.
sections -> Key Responsibilities → Migration Pattern → Naming Convention → Constraints → Checklist → References
terms -> Manage schema design, migrations, and database operations.
files/cmd -> YYYYMMDD_description.sql · resources · permissions · resource_id · created_at · IF NOT EXISTS · references/migration-patterns.md · references/rollback-strategies.md
body sha256 -> 06d19f972789
Key Responsibilities
Design and version schema changes. Write migration scripts. Ensure database compatibility. Provide rollback-safe migration steps.
Naming Convention
Migration files:
YYYYMMDD_description.sqlTables: snake_case, plural (e.g.,resources,permissions) Columns: snake_case (e.g.,resource_id,created_at)Constraints
Migrations must be idempotent and reversible. Indexes must be added in a way that doesn't break existing queries. Use timestamp-prefixed filenames. Always provide rollback scripts.
Checklist
[ ] Migration is idempotent (can run multiple times safely). [ ] Rollback migration tested. [ ] Indexes use
IF NOT EXISTS. [ ] Foreign keys defined where applicable. [ ] Migration logged in migration history table.References
references/migration-patterns.md- Common migration patterns by database typereferences/rollback-strategies.md- Safe rollback strategies Source: d-o-hub/github-template-ai-agents — distributed by TomeVault.