database-switch

Automate PostgreSQL-like database switching with backup, restore, and migrations.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/leandro-br-dev/charhub --skill database-switch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-switch
Source: https://github.com/leandro-br-dev/charhub/tree/main/docs/agents/skills/database-switch
Command: npx skills add https://github.com/leandro-br-dev/charhub --skill database-switch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Switch between clean database (for CI-equivalent tests) and populated database (for manual testing) with automatic backup and restore functionality. Preserves your development data while allowing you to test with a fresh database.

Core Features & Use Cases

  • Automatic backup before switching to clean mode to preserve data
  • Restore from backup when switching to populated mode
  • Handle migrations and system data (admin, bot, narrator)
  • Works in multi-agent environments with environment-aware credentials

Quick Start

Run the switch script to toggle between clean and populated modes.

Frequently Asked Questions about database-switch

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

FAQPage Schema
How do I switch a PostgreSQL development database between clean and populated states?

Switching a PostgreSQL development database between clean and populated states requires automated scripts that create backups, manage volumes, and restore data. This preserves your manual testing data while allowing fresh CI-equivalent test runs.

How does database backup and restore work during automated test pipeline switches?

Database backup and restore during test pipeline switches works by automatically creating a backup before switching to clean mode and restoring from that backup when switching back to populated mode, coordinating migrations and service restarts.

Can I use database migration scripts in multi-agent environments with environment-aware credentials?

Yes, database migration scripts can operate in multi-agent environments using environment-aware credentials. The automation handles system data like admin, bot, and narrator entries while coordinating service health verification after each switch.

What is the best way to automate database backup and restore for manual testing workflows?

The best way to automate database backup and restore for manual testing workflows is using scripts that toggle between clean and populated modes, automatically preserving your development data while applying migrations and verifying service health.

When should I avoid automatic database switching in dev-ops pipelines?

You should avoid automatic database switching in dev-ops pipelines if your environment lacks scripted operations for managing database volumes, running migrations, and verifying service health after restoration, as these are required for safe switches.