myco:vault-schema-extension

Migrate SQLite vault schemas to Cloudflare D1 with idempotent versioned migrations.

12|2|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/goondocks-co/myco --skill myco-vault-schema-extension
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: myco:vault-schema-extension
Source: https://github.com/goondocks-co/myco/tree/main/.agents/skills/vault-schema-extension
Command: npx skills add https://github.com/goondocks-co/myco --skill myco-vault-schema-extension

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Myco's vault stores data locally in SQLite and mirrors its schema to Cloudflare D1 for team sync. As features evolve, the schema must be migrated safely, with versioned migrations that guard against partial deployments and keep both local and cloud representations in sync.

Core Features & Use Cases

  • Versioned migrations in MIGRATIONS with idempotent changes
  • Add new tables and evolve existing ones with backfill-safe ALTERs
  • Create and maintain FTS indexes and ensure D1 alignment
  • Defensive patterns for D1 lazy migrations and cross-database consistency

Quick Start

Run the vault schema migration tool to apply all pending migrations and align local SQLite and Cloudflare D1 schemas.

Frequently Asked Questions about myco:vault-schema-extension

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

FAQPage Schema
How do I keep my SQLite vault schema and Cloudflare D1 mirror in sync?

To keep SQLite vault and Cloudflare D1 schemas in sync, apply versioned, idempotent migrations that support new tables, backfill-safe ALTERs, and D1's lazy-migration behavior. This ensures local and cloud database representations stay aligned during feature evolution.

What is the best way to run safe schema migrations on Cloudflare D1?

Safe schema migrations on Cloudflare D1 require idempotent changes with guards like IF NOT EXISTS. You must account for D1's lazy-migration behavior by applying defensive patterns that prevent partial deployments and maintain cross-database consistency with SQLite.

How do I add FTS indexes to SQLite and mirror them to D1?

To add FTS indexes to SQLite and mirror them to D1, create the FTS index and set up triggers within your versioned migration. This ensures both the local SQLite vault and the Cloudflare D1 schema maintain full-text search alignment.

Can I use backfill-safe ALTER statements to evolve an existing SQLite and D1 schema?

Yes, you can evolve existing SQLite and D1 schemas using backfill-safe ALTER statements within idempotent migrations. This approach safely modifies table structures without breaking existing data integrity or cross-database synchronization.

Why do I need to update query modules after a schema migration?

You need to update query modules after a schema migration to reflect structural changes like new tables or altered columns. This ensures application queries correctly target the updated schema in both the local SQLite vault and Cloudflare D1.

What are the limitations of D1 lazy migrations for local and cloud sync?

D1 lazy migrations can cause partial deployment states where the cloud schema lags behind local SQLite. To overcome this limitation, use versioned migrations with defensive patterns and guards to enforce cross-database consistency.