Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 8x 8x | import { createRelationalStructure } from "../create-relational-structure";
import { normalize } from "../normalize";
import { createDataMigration } from "./create-data-migration";
import { createInitialMigration } from "./create-initial-migration";
export function createMigrations({
prefix,
data,
schemaName,
}: {
prefix: string;
data: unknown;
schemaName?: string | undefined;
}) {
const tables = createRelationalStructure(prefix, normalize(data));
return {
initialMigration: createInitialMigration({ tables, schemaName }),
dataMigration: createDataMigration({ tables, schemaName }),
};
}
|