sql-schema-creator

Create temporal SQL schemas with triggers and population scripts for ORE Studio.

25|5|Updated Jun 15, 2024
One-click install
npx skills add https://github.com/OreStudio/OreStudio --skill sql-schema-creator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-schema-creator
Source: https://github.com/OreStudio/OreStudio/tree/main/.claude/skills/sql-schema-creator
Command: npx skills add https://github.com/OreStudio/OreStudio --skill sql-schema-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to creating, updating, and maintaining SQL schemas for ORE Studio, including temporal tables, triggers, and population scripts, enabling consistent database evolution.

Core Features & Use Cases

  • Temporal schema generation: Create and version tables with validity periods, versioning, and soft delete semantics.
  • Trigger and notify integration: Implement insert triggers, delete rules, and change notifications to support real-time UI and auditability.
  • Workflow orchestration: Produce drop, populate, and migration scripts aligned with repository conventions to streamline DB maintenance.

Quick Start

Use this skill when you need to scaffold a new domain-type SQL schema; refer to domain type creation to align the SQL with your codebase. Follow the standard file structure under projects/ores.sql/create to generate the necessary create, drop, and notify SQL files.

Frequently Asked Questions about sql-schema-creator

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

FAQPage Schema
How do I create temporal SQL schema tables with versioning and soft delete rules?

Temporal SQL schema tables with versioning and soft delete are created by generating domain-type tables, insert triggers, and population scripts within the ores.sql schema, applying optimistic concurrency and validity period semantics.

How do I set up PostgreSQL triggers for SQL schema change notifications?

PostgreSQL triggers for SQL schema change notifications are set up by implementing insert triggers with optimistic concurrency and notification triggers, enabling real-time UI updates and auditability for domain-type tables.

What is the standard file structure for adding new domain-type SQL schemas?

The standard file structure for adding new domain-type SQL schemas requires generating create, drop, and notify SQL files under the projects/ores.sql/create directory to align with repository conventions.

Can I generate database migration and populate scripts for domain-type tables?

Database migration and populate scripts for domain-type tables are generated by producing drop, populate, and migration scripts aligned with repository conventions, streamlining database maintenance and schema evolution.

Does this SQL schema automation work with PostgreSQL domain types and triggers?

This SQL schema automation works with PostgreSQL by defining domain-type tables, implementing insert and delete triggers with optimistic concurrency, versioning, and soft delete rules within the ores.sql schema.

Why do I need temporal tables and optimistic concurrency for SQL schema management?

Temporal tables and optimistic concurrency are needed for SQL schema management to maintain data validity periods, support versioning, enforce soft delete semantics, and ensure auditability through change notification triggers.