UNPKG

@launchql/migrate

Version:
60 lines (59 loc) 1.79 kB
import { MigrateConfig, DeployOptions, RevertOptions, VerifyOptions, DeployResult, RevertResult, VerifyResult, StatusResult } from './types'; export declare class LaunchQLMigrate { private pool; private pgConfig; private initialized; constructor(config: MigrateConfig); /** * Initialize the migration schema */ initialize(): Promise<void>; /** * Deploy changes according to plan file */ deploy(options: DeployOptions): Promise<DeployResult>; /** * Revert changes according to plan file */ revert(options: RevertOptions): Promise<RevertResult>; /** * Verify deployed changes */ verify(options: VerifyOptions): Promise<VerifyResult>; /** * Get deployment status */ status(project?: string): Promise<StatusResult[]>; /** * Check if a change is deployed */ isDeployed(project: string, changeName: string): Promise<boolean>; /** * Check if Sqitch tables exist in the database */ hasSqitchTables(): Promise<boolean>; /** * Import from existing Sqitch deployment */ importFromSqitch(): Promise<void>; /** * Get recent changes */ getRecentChanges(targetDatabase: string, limit?: number): Promise<any[]>; /** * Get pending changes (in plan but not deployed) */ getPendingChanges(planPath: string, targetDatabase: string): Promise<string[]>; /** * Get all deployed changes for a project */ getDeployedChanges(targetDatabase: string, project: string): Promise<any[]>; /** * Get dependencies for a change */ getDependencies(project: string, changeName: string): Promise<string[]>; /** * Close the database connection pool */ close(): Promise<void>; }