From patriotforge
Use when creating database models, writing migrations, designing schemas, or working with PostgreSQL queries — table naming, data types, constraints, and Alembic workflows.
npx claudepluginhub aka-kolton/patriotforge-claude-plugin --plugin patriotforgeThis skill uses the workspace's default tool permissions.
**Stack:** PostgreSQL 15 · SQLAlchemy 2.x (async) · Alembic · Railway hosting
Implements Clean Architecture in Android and Kotlin Multiplatform projects: module layouts, dependency rules, UseCases, Repositories, domain models, and data layers with Room, SQLDelight, Ktor.
Enforces code quality on file edits via Plankton hooks: auto-formats, lints, Claude-powered fixes with model tiering, config protection, and legacy package manager blocks.
Enforces C++ Core Guidelines for writing, reviewing, and refactoring modern C++ code (C++17+), promoting RAII, immutability, type safety, and idiomatic practices.
Stack: PostgreSQL 15 · SQLAlchemy 2.x (async) · Alembic · Railway hosting
forge_ prefix: forge_users, forge_quotes, forge_line_itemsprintshop database on Railway PostgreSQLpublic (default)mapped_column(UUID, primary_key=True, default=uuid4)| Column | Type | Notes |
|---|---|---|
id | UUID | PK, default uuid4() |
created_at | DateTime(timezone=True) | server_default=func.now() |
updated_at | DateTime(timezone=True) | onupdate=func.now() |
deleted_at | DateTime(timezone=True) | Nullable — soft delete flag |
NUMERIC(12,2) — NEVER use FLOAT or DECIMAL without precisionNUMERIC(5,4) — stores as 0.0750 for 7.5%INTEGER or NUMERIC(10,2) for fractionalWHERE deleted_at IS NULLcompany_id filterdeleted_at = now()12345Q — Quote12345SO — Sales Order12345-01 — Work Order (dash + sequence)INV12345 — InvoicePY# — Paymentfrom sqlalchemy.orm import Mapped, mapped_column, DeclarativeBase
from sqlalchemy import String, DateTime, func
from uuid import UUID, uuid4
class Base(DeclarativeBase):
pass
class User(Base):
__tablename__ = "forge_users"
id: Mapped[UUID] = mapped_column(UUID, primary_key=True, default=uuid4)
email: Mapped[str] = mapped_column(String(255), unique=True, index=True)
deleted_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
updated_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), onupdate=func.now())
alembic revision --autogenerate -m "description"alembic/env.py so autogenerate detects themalembic upgrade headforge_app — runtime (SELECT, INSERT, UPDATE on data tables)forge_migrate — migration only (CREATE, ALTER, DROP)CHECK constraints on enum-like columns📖 Full schema: docs/plans/2026-01-24-database-schema.md, Model example: backend/app/models/user.py