db-scout
Version:
get database information, generate migration files, create models based on information
25 lines (24 loc) • 862 B
TypeScript
import { IPostgreSQlSeed, Props } from './interface';
export type { RelationalSchema as Schema } from 'uncertainjs';
export declare class DbScout {
private props;
private folderDir;
private file;
private path;
private random;
private psqlScout;
private migrationOrderClass;
constructor(props?: Props);
private readConfigSync;
getMigration(): Promise<string>;
generateMigration(): Promise<string>;
private getMigrationDiff;
runMigration(): Promise<string>;
private updateDbScoutTableInfo;
getDocumentation(): Promise<string>;
generateDocumentation(): Promise<string>;
getInterface(): Promise<string>;
generateInterface(): Promise<string>;
getSeedData(payload?: IPostgreSQlSeed): Promise<Record<string, Record<string, any>[]>>;
seedData(payload?: IPostgreSQlSeed): Promise<string>;
}