schema-design

Solid

Use when designing database schemas, creating or modifying tables, choosing column types, adding indexes, or working with the Butterbase declarative schema DSL

API & Backend 424 stars 40 forks Updated today MIT

Install

View on GitHub

Quality Score: 88/100

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

Skill Content

# Schema Design Skill Reference guide for Butterbase's declarative schema DSL. Covers column types, constraints, indexes, and common data modeling patterns. --- ## 1. Overview Butterbase uses a **declarative schema DSL** — you describe the desired end state of your database, and the platform computes and applies the diff. You never write raw `ALTER TABLE` or `CREATE TABLE` SQL. Instead, call `manage_schema` with `action: "apply"` and a JSON payload describing your tables, columns, and indexes. The single `manage_schema` tool exposes four actions: | Action | Purpose | |--------|---------| | `"get"` | Read the current schema | | `"dry_run"` | Preview SQL that `apply` would execute, without running it | | `"apply"` | Apply a declarative schema (diffs against current, runs safe DDL) | | `"list_migrations"` | List applied migrations, most recent first | Key principles: - **Idempotent**: applying the same schema twice is safe — returns "Schema is up to date" if no changes needed - **Additive by default**: new columns and tables are created automatically - **Explicit drops**: destructive operations require opt-in via `_drop` / `_dropColumns` - **Preview first**: use `action: "dry_run"` to see what will change before committing - **Transactional**: each migration runs in a single transaction — all changes commit or all roll back --- ## 2. Column Types Reference | Type | PostgreSQL | Use case | |------|-----------|----------| | `uuid` | UUID | Primary keys, foreign keys | | ...

Details

Author
butterbase-ai
Repository
butterbase-ai/butterbase-skills
Created
1 months ago
Last Updated
today
Language
N/A
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Featured

postgresql

Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features

39,350 Updated today
sickn33
API & Backend Listed

postgresql

Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features

335 Updated today
aiskillstore
API & Backend Featured

postgresql

Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features

27,705 Updated today
davila7
API & Backend Listed

design_database_schema

Use this skill when designing or modeling a new database schema — deciding how to represent domain concepts as tables, choosing relationships, normalization, or key strategy. Triggers on: "design a schema for", "how should I model X in the database?", "what tables do I need?", "how to represent this relationship?", "design the data model", "should I use a foreign key or embed?", "normalize this schema", "how do I model many-to-many?", "propose a migration for". Do NOT use for reviewing or assessing an existing schema — those tasks go through invoke_agent.

0 Updated yesterday
feralbureau
API & Backend Listed

database-schema-designer

Design robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint design, and performance optimization. Ensures data integrity, query performance, and maintainable data models.

335 Updated today
aiskillstore