database schema migrations

Data Community

Skill notes

Key Responsibilities

Design and version schema changes. Write migration scripts. Ensure database compatibility. Provide rollback-safe migration steps.

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 — distributed by TomeVault.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
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.

Author source file SKILL.md

# 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 -->

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.