database-reset-staging

Drop staging database schemas and rebuild them through automatic migrations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bash, ssh, psql, docker-compose, curl, and includes scripts (resource) components.

What problem does it solve?

Staging database inconsistencies, outdated schemas, or corruption can block new deployments and testing, requiring manual, error-prone, and time-consuming resets.

Core Features & Use Cases

  • Full Schema Drop: Performs a complete, destructive reset of the staging database (witchcityrope_staging), dropping all public and cms schemas.
  • Automated Rebuild: Stops staging containers, drops schemas, then restarts containers to trigger automatic migrations and schema rebuild.
  • Verification: Checks for successful schema rebuild and API health post-reset, ensuring the environment is ready for use.
  • Use Case: After a major schema change or when facing database inconsistencies on staging, use this Skill to quickly and reliably reset the database, ensuring migrations run on a clean slate.

Quick Start

Reset the staging database, dropping all schemas and rebuilding.

Frequently Asked Questions about database-reset-staging

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

FAQPage Schema
How do I reset a staging database and rebuild the schema with migrations?

Database reset drops all tables and schemas from your staging environment, then restarts containers to trigger automatic migrations and rebuild the schema from scratch. This resolves inconsistencies, corruption, or schema conflicts blocking deployments.

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

Reset your staging database after major schema changes, migration conflicts, data corruption, or significant refactoring when manual recovery is error-prone. It ensures a clean slate for migrations to run without inherited issues.

Can I reset a staging PostgreSQL database without affecting production?

Yes. This Skill resets only the staging environment and performs prerequisite checks before any destructive operation. It requires explicit confirmation and targets staging containers exclusively, leaving production untouched.

What happens after the staging database is reset and schemas are rebuilt?

The Skill restarts containers, runs automatic migrations to rebuild the schema, then verifies successful schema rebuild and API health to confirm the environment is ready for testing and deployments.

Do I need Docker Compose and SSH access to reset a staging database?

Yes. Database reset requires Docker Compose to manage container lifecycle, SSH for environment access, psql for schema operations, and curl for health verification. All dependencies must be installed and configured.

What schemas does the staging database reset drop?

The reset drops both the `public` and `cms` schemas from the staging database, removing all tables and related objects to enable a complete schema rebuild through migrations.