@electric-sql/cli
Version:
ElectricSQL command line interface (CLI).
24 lines (23 loc) • 1.23 kB
TypeScript
import { Migration } from 'electric-sql/migrators';
import { QueryBuilder } from 'electric-sql/migrators/query-builder';
/**
* Loads the migrations from the provided `migrationsFolder`,
* and updates the specified configuration file `configFile` accordingly.
* @param migrationsFolder Folder containing the migrations.
* @param migrationsFile File containing the built migrations of an electric application.
* Built migrations contain the DDL statements and the triggers.
*/
export declare function buildMigrations(migrationsFolder: string, migrationsFile: string, builder: QueryBuilder): Promise<void>;
/**
* Reads the provided `migrationsFolder` and returns an array
* of all the migrations that are present in that folder.
* Each of those migrations are in their respective folder.
* @param migrationsFolder
*/
export declare function getMigrationNames(migrationsFolder: string): Promise<string[]>;
/**
* Loads all migrations that are present in the provided migrations folder.
* @param migrationsFolder Folder where migrations are stored.
* @returns An array of migrations.
*/
export declare function loadMigrations(migrationsFolder: string, builder: QueryBuilder): Promise<Migration[]>;