adding-database-tables

Automate adding database tables with Drizzle ORM migrations and repository patterns.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/eretica/github-gh-reminder --skill adding-database-tables
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adding-database-tables
Source: https://github.com/eretica/github-gh-reminder/tree/main/.claude/skills/adding-database-tables
Command: npx skills add https://github.com/eretica/github-gh-reminder --skill adding-database-tables

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates and standardizes adding new database tables using Drizzle ORM migrations and a repository pattern, reducing boilerplate and ensuring consistency across the codebase.

Core Features & Use Cases

  • Schema definition guidance: How to add table definitions in src/main/db/schema.ts with drizzle-orm.
  • Migration generation and verification: Create migrations with pnpm db:generate and validate SQL.
  • Repository pattern implementation: Create and export a repository class with CRUD operations.
  • Testing and IPC integration: Include unit tests and wire IPC handlers for data access.

Quick Start

Follow the steps to add a new table and wire up a repository using Drizzle ORM, migrations, and IPC integration.

Frequently Asked Questions about adding-database-tables

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

FAQPage Schema
How do I add a new database table using Drizzle ORM migrations?

To add a database table with Drizzle ORM, define the schema in src/main/db/schema.ts, generate migrations using pnpm db:generate, and validate the output SQL. This ensures schema updates are version-controlled and consistent across the codebase.

What's the best way to implement a repository pattern for SQLite in TypeScript?

Implementing a repository pattern for SQLite involves creating a repository class with CRUD operations after defining your Drizzle ORM schema. This isolates data access logic, making your TypeScript data layer cohesive and easily testable with unit tests.

How do I wire IPC handlers for database repository access in TypeScript?

Wiring IPC handlers for repository access requires connecting your repository class methods to IPC channels. This exposes CRUD operations to the frontend, ensuring end-to-end reliability through integration checks before data access requests are processed.

Does this Drizzle ORM migration workflow include unit testing and integration checks?

Yes, the Drizzle ORM migration workflow includes writing unit tests for repository implementations and performing integration checks. This enforces end-to-end reliability by validating schema updates, migration SQL, and IPC wiring together.

Can I use this repository pattern approach for existing TypeScript SQLite projects?

Yes, you can use this repository pattern approach for TypeScript SQLite projects. It standardizes adding tables by guiding schema definitions, generating migrations, implementing repositories, and wiring IPC, reducing boilerplate for both new and existing tables.