database-reset-dev

Drop and recreate PostgreSQL schemas, then restart the API container to trigger auto-seeding.

1|1|Updated Jun 28, 2025
One-click install
npx skills add https://github.com/DarkMonkDev/WitchCityRope --skill database-reset-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-reset-dev
Source: https://github.com/DarkMonkDev/WitchCityRope/tree/main/.claude/skills/database-reset-dev
Command: npx skills add https://github.com/DarkMonkDev/WitchCityRope --skill database-reset-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docker, docker-compose, psql.

What problem does it solve?

Resets the local development database by dropping schemas, recreating, and restarting the API container to trigger automatic seeding.

Core Features & Use Cases

  • Destructive dev DB reset: Drops public and cms schemas, then recreates them.
  • Auto-seeding: API container seeds the database on startup when empty.
  • Minimal downtime: Stops the API container, restarts, and validates health.

Quick Start

From project root, run:

  • bash .claude/skills/database-reset-dev/execute.sh To skip confirmation:
  • SKIP_CONFIRMATION=true bash .claude/skills/database-reset-dev/execute.sh

Frequently Asked Questions about database-reset-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reset my local PostgreSQL development database?

Reset your local dev database by dropping and recreating the public and cms schemas, then restarting the API container to trigger auto-seeding. Run bash .claude/skills/database-reset-dev/execute.sh from your project root with Docker running and psql installed.

When should I reset my dev database instead of manual fixes?

Reset when your database is corrupted or inconsistent, after manual data changes, when you need fresh seed data, or when testing requires a clean slate. The destructive operation clears all data and restarts the API container to reinitialize schemas.

What are the prerequisites for running a database reset with docker-compose?

You need Docker running, docker-compose configured for your witchcityrope_dev environment with PostgreSQL on port 5434, and psql installed locally. The Skill enforces these prerequisites before executing the reset.

Can I skip the confirmation prompt when resetting the dev database?

Yes, set SKIP_CONFIRMATION=true before running the script: SKIP_CONFIRMATION=true bash .claude/skills/database-reset-dev/execute.sh. The reset still performs initialization, migrations, and seed checks to ensure database readiness.

What happens to my data when I reset the development database?

All data in the public and cms schemas is permanently deleted. The API container restarts and automatically seeds the database on startup when it detects empty schemas, restoring consistent seed data.

Does database reset work with any PostgreSQL version or only specific configurations?

The Skill targets local development environments using witchcityrope_dev with PostgreSQL on port 5434. It validates Docker and psql dependencies but is designed for this specific dev configuration.