tdc-database

Automate MySQL schema, migrations, seeds, and backups via CLI scripts.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/Alex-65/tdcweb --skill tdc-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdc-database
Source: https://github.com/Alex-65/tdcweb/tree/main/.claude/skills/tdc-database
Command: npx skills add https://github.com/Alex-65/tdcweb --skill tdc-database

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mysql, mysqldump, gzip, gunzip.

What problem does it solve?

This Skill provides an automated, reliable workflow to manage The Dreamer's Cave MySQL database, including schema evolution, migrations, data seeding, and safe backups/restores, reducing manual DB toil and drift across environments.

Core Features & Use Cases

  • Schema management: maintain the canonical schema with sql/schema.sql and coordinated migrations.
  • Migrations & seeding: apply incremental migrations from sql/migrations and seed initial data from sql/seeds.
  • Backup & restore: create consistent backups and restore from them using standard MySQL CLI tools for disaster recovery and environment replication.
  • Use Case: a developer initializes a new environment by reproducing production schema, running migrations, seeding data, and setting up a local database identical to production.

Quick Start

Run the following commands to get started:

  • Initialize from scratch: ./sql/scripts/init_db.sh --drop-existing
  • Apply pending migrations: ./sql/scripts/migrate.sh
  • Create a backup: ./sql/scripts/backup.sh tdcweb_backup
  • Restore from backup: ./sql/scripts/restore.sh /path/to/tdcweb_backup.sql.gz

Frequently Asked Questions about tdc-database

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

FAQPage Schema
How do I automate MySQL schema migrations and database seeding across dev and prod environments?

Initialize a MySQL database from scratch by running an initialization script with a drop-existing flag. This executes the canonical schema.sql file to create the baseline structure before applying subsequent migrations or seeds.

What is the best way to backup and restore a MySQL database using mysqldump and gzip?

Backup and restore a MySQL database by running dedicated scripts that utilize mysqldump to export the schema and data, compress it with gzip, and decompress with gunzip for restores, ensuring consistent disaster recovery and environment replication.

Do I need mysql and mysqldump CLI tools installed to manage database migrations and backups?

Yes, you need mysql and mysqldump CLI tools installed to manage database migrations and backups. The workflow also requires gzip and gunzip utilities to handle compressed backup files for restore and disaster recovery operations.

Can I reproduce a production MySQL database schema and seed data to set up a local development environment?

Yes, you can reproduce a production MySQL database schema and seed data locally by running initialization, migration, and seeding scripts in sequence. This workflow creates a local database identical to production using standard CLI tools.

Why does my MySQL migration workflow require a specific file layout with sql/schema.sql and sql/migrations?

A MySQL migration workflow requires a specific file layout with sql/schema.sql and sql/migrations to maintain canonical schema definitions and coordinate incremental changes. This structure allows scripts to systematically apply migrations and seeds without drift.