schema-drift-apply

Detect API drift, infer PostgreSQL types, patch schema.sql, and rebuild Docker.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/nicolehaugen/CustomMetricsDashboard --skill schema-drift-apply
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: schema-drift-apply
Source: https://github.com/nicolehaugen/CustomMetricsDashboard/tree/main/.github/skills/schema-drift-apply
Command: npx skills add https://github.com/nicolehaugen/CustomMetricsDashboard --skill schema-drift-apply

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docker, docker-compose, psql, and includes scripts (resource) and assets (resource) components.

What problem does it solve?

This Skill automatically detects and applies API drift changes to your database schema, ensuring that your application remains compatible with updated APIs.

Core Features & Use Cases

  • Automatic Schema Updates: Detects and applies changes to your database schema based on API drift.
  • Infer Column Types: Automatically infers PostgreSQL column types based on naming conventions.
  • Patch Schema.sql: Modifies the schema.sql file to include new drift columns.
  • Rebuild and Relaunch: Rebuilds and relaunches the Docker application to apply changes.
  • Verify Changes: Verifies that the new columns have been added to the database.

Quick Start

Apply schema drift changes to the 'copilot_enterprise_daily' table with new field names 'new_column1', 'new_column2'.

Frequently Asked Questions about schema-drift-apply

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

FAQPage Schema
How do I automatically update a PostgreSQL database schema from API drift?

To apply API drift to a PostgreSQL schema, the process detects API changes, infers PostgreSQL types, patches schema.sql, rebuilds Docker, and verifies that the new columns are successfully added to the database.

How do I add new columns to a PostgreSQL schema using Docker Compose?

You can add new columns by patching the schema.sql file with inferred PostgreSQL types and then using Docker Compose to rebuild and relaunch the application, which applies the schema updates to the database.

Do I need psql and Docker installed to synchronize my database schema with API changes?

Yes, you need Docker, Docker Compose, and psql installed. These tools are required to rebuild the environment and verify that the patched schema.sql changes are correctly applied to the PostgreSQL database.

What is API drift and when do I need to update my database schema?

API drift happens when an API introduces new fields. You need to update your database schema when these API changes require new PostgreSQL columns to keep your application compatible with the updated API.

Can I infer PostgreSQL column types automatically from new API fields?

Yes, PostgreSQL column types are inferred automatically based on naming conventions from the API drift, allowing the schema.sql file to be patched with the correct data types before rebuilding Docker.

Why are my new API fields not showing up in the PostgreSQL database after a schema update?

If new fields are missing, the Docker application may need a rebuild to apply the patched schema.sql. The Skill verifies changes to ensure new columns are actually added to the PostgreSQL database after rebuilding.