Install
$ agentstack add skill-benja-pauls-serpentstack-db-migrate ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Database Migrations
Manage database schema changes with Alembic in SerpentStack.
Prerequisites
- Postgres running:
docker compose up -d postgres - Backend dependencies installed:
cd backend && uv sync
Creating a New Migration
After modifying or adding a SQLAlchemy model:
cd backend && uv run alembic revision --autogenerate -m "describe the change"
The migration description should be concise and specific, e.g., "add projects table", "add email column to users", "create index on tasks.status".
Review the generated file in backend/migrations/versions/. Verify:
- The
upgrade()function contains the expectedop.create_table,op.add_column, orop.create_indexcalls. - The
downgrade()function is the inverse of upgrade. - No unintended changes are included (Alembic sometimes detects phantom diffs).
Running Migrations
Apply all pending migrations:
cd backend && uv run alembic upgrade head
Apply only the next migration:
cd backend && uv run alembic upgrade +1
Checking Migration Status
See the current revision:
cd backend && uv run alembic current
See full migration history:
cd backend && uv run alembic history --verbose
Downgrading
Roll back the last migration:
cd backend && uv run alembic downgrade -1
Roll back to a specific revision:
cd backend && uv run alembic downgrade
Adding a New Table
Full workflow:
- Create the model file at
backend/app/models/{name}.py— inherit fromBase(providesid,created_at,updated_at). - Import the model in
backend/app/models/__init__.pyso Alembic detects it. - Generate the migration:
cd backend && uv run alembic revision --autogenerate -m "add {name}s table". - Review the generated migration file.
- Apply:
cd backend && uv run alembic upgrade head. - Verify: connect to the database and confirm the table exists.
Adding a Column to an Existing Table
- Edit the model in
backend/app/models/{name}.py-- add the new column. - Generate:
cd backend && uv run alembic revision --autogenerate -m "add {column} to {name}s". - Review: ensure only the expected
op.add_columnis present. - Apply:
cd backend && uv run alembic upgrade head.
Troubleshooting
| Problem | Solution | |---|---| | Target database is not up to date | Run uv run alembic upgrade head first | | Can't locate revision | Check alembic.ini for correct script_location | | Phantom diffs in autogenerate | Compare model against DB schema manually; add to Alembic's exclude list if needed | | relation already exists | The migration was partially applied. Check alembic_version table and fix manually | | Migration conflicts (multiple heads) | Run uv run alembic merge heads -m "merge migrations" | | ModuleNotFoundError on model import | Ensure model is imported in backend/app/models/__init__.py | | Docker not running | Testcontainers and local Postgres both require Docker Desktop to be running |
Seed Data
Populate the database with sample development data:
make seed
This runs the async seed CLI command at backend/app/cli/seed.py. The seed script is idempotent — running it multiple times will not create duplicates (it checks for existing rows first).
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Benja-Pauls
- Source: Benja-Pauls/SerpentStack
- License: MIT
- Homepage: https://www.npmjs.com/package/serpentstack
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.