@clickup/pg-mig
Version:
PostgreSQL schema migration tool with microsharding and clustering support
39 lines • 1.02 kB
TypeScript
/**
* One migration file (either *.up.* or *.dn.*).
*/
export interface File {
fileName: string;
parallelismPerHost: number;
parallelismGlobal: number;
delay: number;
runAlone: boolean;
}
/**
* A pair of up+dn files representing one migration.
*/
export interface Entry {
up: File;
dn: File;
name: string;
schemaPrefix: string;
}
/**
* A directory with migration entries.
* For every entry, an "up" and a "dn" files are required.
*/
export declare class Registry {
readonly dir: string;
private entriesByPrefix;
private versions;
readonly beforeFile: File | null;
readonly afterFile: File | null;
constructor(dir: string);
static chooseBestDigest(values: string[]): string;
get prefixes(): string[];
groupBySchema(schemas: string[]): ReadonlyMap<string, Entry[]>;
getVersions(): string[];
hasVersion(version: string): boolean;
extractVersion(name: string): string;
getDigest(): string;
}
//# sourceMappingURL=Registry.d.ts.map