/** * `c15t self-host migrate` — bring a database up to the current schema. * * The 2.x version of this command asked which ORM adapter you used, handed the * answer to fumadb, and then took one of two paths: a real migration for * Kysely and Mongo, or — for Drizzle, Prisma and TypeORM — writing a schema * file for the operator to apply themselves. It also could not migrate MySQL * at all, on any adapter. * * There is one path now. `migrate()` classifies the database, adopts it to the * frozen 2.0.0 baseline if it is behind, and applies whatever numbered * migrations the ledger has not recorded. Postgres, MySQL and SQLite alike. * * ## Dry run first, always * * The plan is computed and shown before anything is written, and applying it * needs an explicit yes. This is the one command in the CLI that writes to a * production database, and adopting a 1.x schema is not a small change. */ import { createMigrator } from '@c15t/backend'; import { installDependencies } from '../../generate/options/utils/dependencies.js'; import { ensureBackendConfig } from './ensure-backend-config.js'; import { readDatabaseConfig } from './read-config.js'; import { confirmApply, describePlan, isUpToDate } from './report.js'; import type { CliContext } from '../../../context/types.js'; interface MigrateDependencies { confirmApply: typeof confirmApply; createMigrator: typeof createMigrator; describePlan: typeof describePlan; ensureBackendConfig: typeof ensureBackendConfig; installDependencies: typeof installDependencies; isUpToDate: typeof isUpToDate; readDatabaseConfig: typeof readDatabaseConfig; } export declare const migrate: (context: CliContext, dependencies?: MigrateDependencies) => Promise<{ report: import("@c15t/backend").MigrateReport; status: string; }>; export {};