convex-migration — community convex-migration, rubic2tripletex, community, ide skills

v1.0.0

About this Skill

Perfect for Backend Agents needing seamless migration from Drizzle ORM to Convex for advanced data integration and Neon Postgres management. Guide migration from the current Drizzle ORM / Neon Postgres stack to Convex. Use when the user asks about Convex, migrating the database, replacing Drizzle, or setting up Convex schema, functions, or

frodeste frodeste
[0]
[0]
Updated: 3/12/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 7/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Locale and body language aligned
Review Score
7/11
Quality Score
39
Canonical Locale
en
Detected Body Locale
en

Perfect for Backend Agents needing seamless migration from Drizzle ORM to Convex for advanced data integration and Neon Postgres management. Guide migration from the current Drizzle ORM / Neon Postgres stack to Convex. Use when the user asks about Convex, migrating the database, replacing Drizzle, or setting up Convex schema, functions, or

Core Value

Empowers agents to perform efficient database migrations using Convex as the backend, leveraging Drizzle ORM and Neon Postgres, while managing schema migrations and client connections through `drizzle-kit` and `src/db/schema.ts`.

Ideal Agent Persona

Perfect for Backend Agents needing seamless migration from Drizzle ORM to Convex for advanced data integration and Neon Postgres management.

Capabilities Granted for convex-migration

Migrating existing Drizzle ORM projects to Convex for enhanced scalability
Integrating Convex with Neon Postgres for serverless database solutions
Managing complex schema migrations with composite primary keys and enums

! Prerequisites & Limits

  • Requires existing Drizzle ORM setup with Neon Postgres
  • Compatibility limited to projects using Drizzle ORM 0.45.x and `drizzle-kit`
  • Neon Postgres serverless database connection necessary

Why this page is reference-only

  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is convex-migration?

Perfect for Backend Agents needing seamless migration from Drizzle ORM to Convex for advanced data integration and Neon Postgres management. Guide migration from the current Drizzle ORM / Neon Postgres stack to Convex. Use when the user asks about Convex, migrating the database, replacing Drizzle, or setting up Convex schema, functions, or

How do I install convex-migration?

Run the command: npx killer-skills add frodeste/rubic2tripletex/convex-migration. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for convex-migration?

Key use cases include: Migrating existing Drizzle ORM projects to Convex for enhanced scalability, Integrating Convex with Neon Postgres for serverless database solutions, Managing complex schema migrations with composite primary keys and enums.

Which IDEs are compatible with convex-migration?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for convex-migration?

Requires existing Drizzle ORM setup with Neon Postgres. Compatibility limited to projects using Drizzle ORM 0.45.x and `drizzle-kit`. Neon Postgres serverless database connection necessary.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add frodeste/rubic2tripletex/convex-migration. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use convex-migration immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

convex-migration

Install convex-migration, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Convex Migration Guide

This project currently uses Drizzle ORM + Neon Postgres. This skill guides migration to Convex as the backend database.

Current Stack (What We're Migrating From)

  • ORM: Drizzle ORM 0.45.x with drizzle-kit for migrations
  • Database: Neon Postgres (serverless)
  • Schema: src/db/schema.ts -- 4 tables with enums, composite primary keys
  • Client: src/db/client.ts -- Drizzle client with Neon connection
  • Migrations: src/db/migrations/ -- SQL migration files

Current Tables

TablePurposeKey Fields
sync_stateTracks each sync runserial PK, sync_type enum, status enum, timestamps
customer_mappingRubic customerNo -> Tripletex customerIdcomposite PK (rubic_id, env), hash
product_mappingRubic productCode -> Tripletex productIdcomposite PK (rubic_id, env), hash
invoice_mappingRubic invoiceId -> Tripletex invoiceIdcomposite PK (rubic_id, env), payment_synced

Current Enums

  • sync_type: "customers" | "products" | "invoices" | "payments"
  • sync_status: "running" | "success" | "failed"
  • tripletex_env: "sandbox" | "production"

Convex Equivalents

Schema Translation

The current Drizzle schema in src/db/schema.ts maps to Convex like this:

typescript
1// convex/schema.ts 2import { defineSchema, defineTable } from "convex/server"; 3import { syncType, syncStatus, tripletexEnv } from "./validators"; 4 5export default defineSchema({ 6 syncState: defineTable({ 7 syncType: syncType, 8 tripletexEnv: tripletexEnv, 9 lastSyncAt: v.optional(v.number()), // epoch ms 10 status: syncStatus, 11 errorMessage: v.optional(v.string()), 12 recordsProcessed: v.number(), 13 recordsFailed: v.number(), 14 startedAt: v.number(), // epoch ms 15 completedAt: v.optional(v.number()), 16 }) 17 .index("by_type_and_env", ["syncType", "tripletexEnv"]) 18 .index("by_status", ["status"]), 19 20 customerMapping: defineTable({ 21 rubicCustomerNo: v.string(), 22 tripletexEnv: tripletexEnv, 23 tripletexCustomerId: v.number(), 24 lastSyncedAt: v.number(), 25 hash: v.optional(v.string()), 26 }) 27 .index("by_rubic_and_env", ["rubicCustomerNo", "tripletexEnv"]), 28 29 productMapping: defineTable({ 30 rubicProductCode: v.string(), 31 tripletexEnv: tripletexEnv, 32 tripletexProductId: v.number(), 33 lastSyncedAt: v.number(), 34 hash: v.optional(v.string()), 35 }) 36 .index("by_rubic_and_env", ["rubicProductCode", "tripletexEnv"]), 37 38 invoiceMapping: defineTable({ 39 rubicInvoiceId: v.number(), 40 tripletexEnv: tripletexEnv, 41 rubicInvoiceNumber: v.number(), 42 tripletexInvoiceId: v.number(), 43 lastSyncedAt: v.number(), 44 paymentSynced: v.boolean(), 45 }) 46 .index("by_rubic_and_env", ["rubicInvoiceId", "tripletexEnv"]), 47});

Key Translation Rules

Drizzle / PostgresConvex
serial("id").primaryKey()Auto-generated _id (no serial IDs)
pgEnum("name", [...])v.union(v.literal("a"), v.literal("b"))
Composite primary key.index("name", ["field1", "field2"]) + unique enforcement in mutations
timestamp({ withTimezone: true })v.number() (epoch ms via Date.now())
varchar("col", { length: N })v.string() (no length limits in Convex)
integer("col")v.number()
boolean("col")v.boolean()
text("col")v.string()
.notNull()Field is required by default
.default(value)Set in mutation handler, not in schema
NULL / nullablev.optional(v.string())

Function Patterns

Convex replaces raw SQL / Drizzle queries with typed functions. Extract shared validators into a convex/validators.ts file so they can be reused across schema and functions:

typescript
1// convex/validators.ts 2import { v } from "convex/values"; 3 4export const syncType = v.union( 5 v.literal("customers"), 6 v.literal("products"), 7 v.literal("invoices"), 8 v.literal("payments"), 9); 10 11export const syncStatus = v.union( 12 v.literal("running"), 13 v.literal("success"), 14 v.literal("failed"), 15); 16 17export const tripletexEnv = v.union( 18 v.literal("sandbox"), 19 v.literal("production"), 20);

Use these validators in function args for consistent type safety (not v.string()):

Query (read data):

typescript
1// convex/syncState.ts 2import { query } from "./_generated/server"; 3import { syncType, tripletexEnv } from "./validators"; 4 5export const getLatest = query({ 6 args: { syncType, tripletexEnv }, 7 handler: async (ctx, args) => { 8 return await ctx.db 9 .query("syncState") 10 .withIndex("by_type_and_env", (q) => 11 q.eq("syncType", args.syncType).eq("tripletexEnv", args.tripletexEnv), 12 ) 13 .order("desc") 14 .first(); 15 }, 16});

Mutation (write data):

typescript
1// convex/syncState.ts 2import { mutation } from "./_generated/server"; 3import { syncType, tripletexEnv } from "./validators"; 4 5export const startSync = mutation({ 6 args: { syncType, tripletexEnv }, 7 handler: async (ctx, args) => { 8 return await ctx.db.insert("syncState", { 9 syncType: args.syncType, 10 tripletexEnv: args.tripletexEnv, 11 status: "running", 12 recordsProcessed: 0, 13 recordsFailed: 0, 14 startedAt: Date.now(), 15 }); 16 }, 17});

Action (external API calls):

Sync logic that calls Rubic/Tripletex APIs should use actions, since they can call external services:

typescript
1// convex/sync.ts 2import { action } from "./_generated/server"; 3import { api } from "./_generated/api"; 4import { tripletexEnv } from "./validators"; 5 6export const syncCustomers = action({ 7 args: { tripletexEnv }, 8 handler: async (ctx, args) => { 9 // Call external APIs 10 const customers = await fetchFromRubic(); 11 12 // Write to Convex DB via mutations 13 for (const customer of customers) { 14 await ctx.runMutation(api.customerMapping.upsert, { 15 rubicCustomerNo: customer.customerNo, 16 tripletexEnv: args.tripletexEnv, 17 // ... 18 }); 19 } 20 }, 21});

Next.js Integration

typescript
1// In Server Components or Route Handlers 2import { fetchQuery, fetchMutation } from "convex/nextjs"; 3import { api } from "@/convex/_generated/api"; 4 5// Read 6const state = await fetchQuery(api.syncState.getLatest, { 7 syncType: "customers", 8 tripletexEnv: "production", 9}); 10 11// Write 12await fetchMutation(api.syncState.startSync, { 13 syncType: "customers", 14 tripletexEnv: "production", 15});

Requires NEXT_PUBLIC_CONVEX_URL and CONVEX_URL environment variables.

Migration Steps

  1. Install Convex: bun add convex and npx convex dev to initialize
  2. Create schema: convex/schema.ts (see translation above)
  3. Create functions: convex/*.ts for queries, mutations, actions
  4. Migrate data: Write a one-time script to read from Neon and insert into Convex
  5. Update API routes: Replace Drizzle queries with Convex function calls
  6. Update sync logic: Move src/sync/ orchestration to Convex actions
  7. Remove Drizzle: Remove drizzle-orm, drizzle-kit, @neondatabase/serverless, and src/db/

Key Differences to Keep in Mind

  • No raw SQL -- all data access is through Convex functions
  • No migrations -- schema changes are applied automatically by npx convex dev / npx convex deploy
  • No connection pooling -- Convex handles connections internally
  • Composite uniqueness -- enforce in mutation handlers (query by index, check existence), not at schema level
  • Timestamps -- use Date.now() (epoch ms) instead of SQL TIMESTAMP WITH TIME ZONE
  • Realtime by default -- Convex queries are reactive; the dashboard would get live sync status updates for free

Reference

Related Skills

Looking for an alternative to convex-migration or another community skill for your workflow? Explore these related open-source skills.

View All

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

The React Framework

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
Developer