database-tables

Define and migrate PostgreSQL table schemas using Drizzle ORM.

2|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/symbiosika/symbiosika-framework --skill database-tables
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-tables
Source: https://github.com/symbiosika/symbiosika-framework/tree/main/docs/skills/database-tables
Command: npx skills add https://github.com/symbiosika/symbiosika-framework --skill database-tables

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you create and evolve database schemas using Drizzle ORM in PostgreSQL, including adding or modifying tables, columns, indexes, and relations, and generating migrations.

Core Features & Use Cases

  • Define framework tables with the base_ prefix and app tables with the app_ prefix.
  • Add relations, indexes, and timestamp fields following Drizzle ORM patterns.
  • Generate and apply migrations from the backend directory using the provided tooling.

Quick Start

Define your first table in backend/src/db/schema.ts and run the generated migration from the backend directory.

Frequently Asked Questions about database-tables

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

FAQPage Schema
How do I create PostgreSQL table schemas using Drizzle ORM?

To create PostgreSQL table schemas using Drizzle ORM, define tables with appropriate prefixes in backend/src/db/schema.ts, add relations and indexes, then run the migration tooling from the backend directory to apply schema changes.

What is the correct prefix for framework and app tables in Drizzle schema files?

Framework tables require the base_ prefix and app tables require the app_ prefix in Drizzle schema files. This convention separates core framework data from application-specific data within your PostgreSQL database.

How do I generate database migrations with Drizzle ORM in a backend project?

Generate database migrations with Drizzle ORM by defining or altering table structures in backend/src/db/schema.ts, then executing the provided drizzle tooling from the backend directory to create migration files.

Can I add indexes and timestamp fields to existing PostgreSQL tables using Drizzle ORM?

Yes, you can add indexes and timestamp fields to existing PostgreSQL tables using Drizzle ORM. Alter your table definitions in backend/src/db/schema.ts following Drizzle patterns, then generate a new migration to apply the changes.

Does this database schema approach work with raw PostgreSQL or only through Drizzle ORM?

This database schema approach works specifically through Drizzle ORM for PostgreSQL. It leverages Drizzle's schema definition patterns and migration tooling rather than writing raw SQL scripts directly.

What's the best way to structure database tables for a backend application using Drizzle?

The best way to structure database tables using Drizzle is to centralize definitions in backend/src/db/schema.ts, apply base_ and app_ prefixes to distinguish layers, define relations explicitly, and generate migrations via tooling.