UNPKG

@clickup/pg-microsharding

Version:
22 lines 875 B
import type { Sql } from "./quote"; /** * Runs pg_dump, does some basic parsing and returns the result. * * By default, the tool does not validate FKs on the destination, since it's * implied they were already valid on the source. So the FKs on the destination * are created with "NOT VALID" clause. This speeds up microshards moving * severely. The downside is that, if we later run pg_dump over the migrated * destination shard, it will emit "ALTER TABLE ... ADD CONSTRAINT ... NOT * VALID" as well (i.e. PG remembers that the FKs were not validated). This is * not the end of the world, just inaccurate. */ export declare function getDump({ fromDsn, schema, validateFKs, }: { fromDsn: string; schema: string; validateFKs: boolean; }): Promise<{ preData: Sql; primaryKeys: string[]; postData: Sql; }>; //# sourceMappingURL=getDump.d.ts.map