managing-database-tests

Solid

Test database testing including fixtures, transactions, and rollback management. Use when performing specialized testing. Trigger with phrases like "test the database", "run database tests", or "validate data integrity".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Database Test Manager ## Overview Manage database testing including fixture loading, transaction-based test isolation, migration validation, query performance testing, and data integrity checks. Supports PostgreSQL, MySQL, MongoDB, SQLite (in-memory), and Redis with ORM-agnostic patterns for Prisma, TypeORM, SQLAlchemy, Knex, and Drizzle. ## Prerequisites - Database instance available for testing (Docker container, in-memory SQLite, or dedicated test server) - Database client library and ORM installed (Prisma, TypeORM, Knex, SQLAlchemy, etc.) - Migration files up to date and tested independently - Test database connection string configured in environment (distinct from development/production) - Database seed data scripts for baseline test state ## Instructions 1. Set up the test database infrastructure: - Use Docker to spin up a dedicated test database: `docker run -d -p 5433:5432 --name test-db postgres:16-alpine`. - Or use SQLite in-memory mode for fast unit tests: `sqlite::memory:`. - Or use Testcontainers for ephemeral database per test suite. - Verify the test database is isolated from development data. 2. Run database migrations against the test database: - Execute `npx prisma migrate deploy` or `npx knex migrate:latest --env test`. - Verify all migrations apply cleanly to an empty database. - Test rollback: run `migrate:rollback` and verify schema reverts correctly. 3. Implement test isolation strategy (choose one): - **Transaction rollb...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

managing-database-testing

This skill manages database testing by generating test data, wrapping tests in transactions, and validating database schemas. It is used to create robust and reliable database interactions. Claude uses this skill when the user requests database testing utilities, including test data generation, transaction management, schema validation, or migration testing. Trigger this skill by mentioning "database testing," "test data factories," "transaction rollback," "schema validation," or using the `/db-test` or `/dbt` commands.

2,266 Updated today
jeremylongshore
API & Backend Solid

creating-oracle-to-postgres-migration-integration-tests

Creates integration test cases for .NET data access artifacts during Oracle-to-PostgreSQL database migrations. Generates DB-agnostic xUnit tests with deterministic seed data that validate behavior consistency across both database systems. Use when creating integration tests for a migrated project, generating test coverage for data access layers, or writing Oracle-to-PostgreSQL migration validation tests.

34,158 Updated yesterday
github
API & Backend Listed

database-migration

Use when planning or applying a raw-SQL database migration to a live PostgreSQL database — adding columns, renaming columns or tables, changing types, creating indexes, adding foreign keys, or running data backfills. Covers zero-downtime patterns (expand / contract, batched backfill, NOT VALID foreign keys, CONCURRENTLY indexes), the unpooled-connection requirement for DDL, branched-database workflows, and rollback strategy. Do NOT use for ORM-managed migrations driven by Prisma/Drizzle/TypeORM CLI scaffolding (the generation rules are tool-specific), for chasing a migration that has already failed in production (use `debugging`), or for designing the row-level-security model itself (use `owasp-security`).

0 Updated 4 days ago
jacob-balslev
AI & Automation Listed

db-check

Validate database schema integrity and check for common issues

0 Updated today
lethilu4796
AI & Automation Solid

running-performance-tests

Execute load testing, stress testing, and performance benchmarking. Use when performing specialized testing. Trigger with phrases like "run load tests", "test performance", or "benchmark the system".

2,266 Updated today
jeremylongshore