axiom-database-migration

Evolve SQLite, GRDB, and SwiftData schemas with additive, idempotent migrations.

Updated Dec 3, 2025
One-click install
npx skills add https://github.com/tuliopc23/flying-dutchman-app --skill axiom-database-migration-tuliopc23
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-database-migration
Source: https://github.com/tuliopc23/flying-dutchman-app/tree/main/.claude/skills/axiom-database-migration
Command: npx skills add https://github.com/tuliopc23/flying-dutchman-app --skill axiom-database-migration-tuliopc23

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents data loss and app crashes caused by unsafe database schema modifications in production environments.

Core Features & Use Cases

  • Safe Schema Evolution: Provides patterns for adding, modifying, and deleting database columns and tables without risking user data.
  • Error Prevention: Addresses common migration errors like "FOREIGN KEY constraint failed" and "cannot add NOT NULL column".
  • Use Case: When you need to add a new feature that requires a new column in your user table, this Skill guides you through the process to ensure existing user data is preserved and the app remains stable.

Quick Start

Use the axiom-database-migration skill to add a new nullable column named 'last_login' to the 'users' table.

Frequently Asked Questions about axiom-database-migration

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

FAQPage Schema
How do I add a new column to a SQLite database without losing existing user data?

To add a new column without losing existing user data, use immutable, additive, and idempotent migration patterns. This Skill guides you through safe schema evolution for production SQLite databases, ensuring new nullable columns preserve user data.

Why does my SwiftData migration fail with a 'cannot add NOT NULL column' error?

A 'cannot add NOT NULL column' error occurs because existing rows lack a default value for the new column. Safe database migration prevents this by applying additive patterns, ensuring schema changes do not violate constraints or crash production apps.

Does this database migration approach work with both GRDB and SwiftData frameworks?

Yes, this database migration approach works with GRDB and SwiftData frameworks for iOS and macOS applications. It provides safe schema evolution patterns tailored to these specific database frameworks to prevent data loss.

What is the best way to handle FOREIGN KEY constraint failures during iOS database schema changes?

The best way to handle FOREIGN KEY constraint failures during database schema changes is to follow strict testing workflows and safe pattern implementation. This Skill addresses common migration errors to ensure stable schema evolution in production environments.

When do I need to use idempotent migration patterns for my macOS app?

You need idempotent migration patterns when evolving database schemas for production macOS applications with existing user data. These patterns prevent data loss and app crashes by ensuring schema modifications can be applied safely multiple times.