import * as drizzle_orm from 'drizzle-orm'; import { AnyMySqlTable, MySqlSchema, MySqlView } from 'drizzle-orm/mysql-core'; import { D as DrizzleLab } from './symbols-CdI5QtS4.cjs'; import { D as DrizzleSchema } from './global-v_LCR4XD.cjs'; import { Relations } from 'drizzle-orm/relations'; import { P as PartialConfig } from './loader.node-Bo9Dqnt1.cjs'; import * as zod from 'zod'; import { TypeOf } from 'zod'; declare const schemaInternal: zod.ZodObject<{ version: zod.ZodLiteral<"5">; dialect: zod.ZodLiteral<"mysql">; tables: zod.ZodRecord; default: zod.ZodOptional; onUpdate: zod.ZodOptional; generated: zod.ZodOptional; as: zod.ZodString; }, "strip", zod.ZodTypeAny, { type: "virtual" | "stored"; as: string; }, { type: "virtual" | "stored"; as: string; }>>; enumValues: zod.ZodOptional>; defaultFn: zod.ZodOptional; onUpdateFn: zod.ZodOptional; description: zod.ZodOptional; jsonShape: zod.ZodOptional; }, "strict", zod.ZodTypeAny, { type: string; name: string; notNull: boolean; primaryKey: boolean; enumValues?: string[] | undefined; description?: string | undefined; generated?: { type: "virtual" | "stored"; as: string; } | undefined; default?: any; onUpdate?: any; defaultFn?: string | undefined; onUpdateFn?: string | undefined; jsonShape?: string | undefined; autoincrement?: boolean | undefined; }, { type: string; name: string; notNull: boolean; primaryKey: boolean; enumValues?: string[] | undefined; description?: string | undefined; generated?: { type: "virtual" | "stored"; as: string; } | undefined; default?: any; onUpdate?: any; defaultFn?: string | undefined; onUpdateFn?: string | undefined; jsonShape?: string | undefined; autoincrement?: boolean | undefined; }>>; indexes: zod.ZodRecord; isUnique: zod.ZodBoolean; using: zod.ZodOptional>; algorithm: zod.ZodOptional>; lock: zod.ZodOptional>; }, "strict", zod.ZodTypeAny, { name: string; columns: string[]; isUnique: boolean; using?: "btree" | "hash" | undefined; algorithm?: "default" | "inplace" | "copy" | undefined; lock?: "default" | "none" | "shared" | "exclusive" | undefined; }, { name: string; columns: string[]; isUnique: boolean; using?: "btree" | "hash" | undefined; algorithm?: "default" | "inplace" | "copy" | undefined; lock?: "default" | "none" | "shared" | "exclusive" | undefined; }>>; foreignKeys: zod.ZodRecord; tableTo: zod.ZodString; schemaTo: zod.ZodOptional; columnsTo: zod.ZodArray; onUpdate: zod.ZodOptional; onDelete: zod.ZodOptional; }, "strict", zod.ZodTypeAny, { name: string; tableFrom: string; columnsFrom: string[]; tableTo: string; columnsTo: string[]; onDelete?: string | undefined; onUpdate?: string | undefined; schemaTo?: string | undefined; }, { name: string; tableFrom: string; columnsFrom: string[]; tableTo: string; columnsTo: string[]; onDelete?: string | undefined; onUpdate?: string | undefined; schemaTo?: string | undefined; }>>; compositePrimaryKeys: zod.ZodRecord; }, "strict", zod.ZodTypeAny, { name: string; columns: string[]; }, { name: string; columns: string[]; }>>; uniqueConstraints: zod.ZodDefault; }, "strict", zod.ZodTypeAny, { name: string; columns: string[]; }, { name: string; columns: string[]; }>>>; checkConstraints: zod.ZodDefault>>; schema: zod.ZodString; relations: zod.ZodDefault; fieldName: zod.ZodString; relationName: zod.ZodString; referencedTableName: zod.ZodString; }, "strict", zod.ZodTypeAny, { type: "many" | "one"; fieldName: string; relationName: string; referencedTableName: string; }, { type: "many" | "one"; fieldName: string; relationName: string; referencedTableName: string; }>, "many">>; description: zod.ZodOptional; }, "strict", zod.ZodTypeAny, { name: string; schema: string; columns: Record; relations: { type: "many" | "one"; fieldName: string; relationName: string; referencedTableName: string; }[]; indexes: Record; foreignKeys: Record; compositePrimaryKeys: Record; uniqueConstraints: Record; checkConstraints: Record; description?: string | undefined; }, { name: string; schema: string; columns: Record; indexes: Record; foreignKeys: Record; compositePrimaryKeys: Record; description?: string | undefined; relations?: { type: "many" | "one"; fieldName: string; relationName: string; referencedTableName: string; }[] | undefined; uniqueConstraints?: Record | undefined; checkConstraints?: Record | undefined; }>>; views: zod.ZodDefault; default: zod.ZodOptional; onUpdate: zod.ZodOptional; generated: zod.ZodOptional; as: zod.ZodString; }, "strip", zod.ZodTypeAny, { type: "virtual" | "stored"; as: string; }, { type: "virtual" | "stored"; as: string; }>>; enumValues: zod.ZodOptional>; defaultFn: zod.ZodOptional; onUpdateFn: zod.ZodOptional; description: zod.ZodOptional; jsonShape: zod.ZodOptional; }, "strict", zod.ZodTypeAny, { type: string; name: string; notNull: boolean; primaryKey: boolean; enumValues?: string[] | undefined; description?: string | undefined; generated?: { type: "virtual" | "stored"; as: string; } | undefined; default?: any; onUpdate?: any; defaultFn?: string | undefined; onUpdateFn?: string | undefined; jsonShape?: string | undefined; autoincrement?: boolean | undefined; }, { type: string; name: string; notNull: boolean; primaryKey: boolean; enumValues?: string[] | undefined; description?: string | undefined; generated?: { type: "virtual" | "stored"; as: string; } | undefined; default?: any; onUpdate?: any; defaultFn?: string | undefined; onUpdateFn?: string | undefined; jsonShape?: string | undefined; autoincrement?: boolean | undefined; }>>; definition: zod.ZodOptional; isExisting: zod.ZodBoolean; description: zod.ZodOptional; }, { algorithm: zod.ZodEnum<["undefined", "merge", "temptable"]>; sqlSecurity: zod.ZodEnum<["definer", "invoker"]>; withCheckOption: zod.ZodOptional>; }>, "strict", zod.ZodTypeAny, { name: string; schema: string; columns: Record; isExisting: boolean; algorithm: "undefined" | "merge" | "temptable"; sqlSecurity: "definer" | "invoker"; description?: string | undefined; definition?: string | undefined; withCheckOption?: "local" | "cascaded" | undefined; }, { name: string; schema: string; columns: Record; isExisting: boolean; algorithm: "undefined" | "merge" | "temptable"; sqlSecurity: "definer" | "invoker"; description?: string | undefined; definition?: string | undefined; withCheckOption?: "local" | "cascaded" | undefined; }>>>; _meta: zod.ZodObject<{ tables: zod.ZodRecord; columns: zod.ZodRecord; }, "strip", zod.ZodTypeAny, { columns: Record; tables: Record; }, { columns: Record; tables: Record; }>; internal: zod.ZodOptional; }, "strip", zod.ZodTypeAny, { isDefaultAnExpression?: boolean | undefined; }, { isDefaultAnExpression?: boolean | undefined; }>>>; }, "strip", zod.ZodTypeAny, { columns: Record; }, { columns: Record; }>>>>; indexes: zod.ZodOptional; }, "strip", zod.ZodTypeAny, { isExpression?: boolean | undefined; }, { isExpression?: boolean | undefined; }>>>; }, "strip", zod.ZodTypeAny, { columns: Record; }, { columns: Record; }>>>>; }, "strip", zod.ZodTypeAny, { tables?: Record; } | undefined> | undefined; indexes?: Record; } | undefined> | undefined; }, { tables?: Record; } | undefined> | undefined; indexes?: Record; } | undefined> | undefined; }>>; schemas: zod.ZodRecord; projectId: zod.ZodDefault>; }, "strict", zod.ZodTypeAny, { dialect: "mysql"; tables: Record; relations: { type: "many" | "one"; fieldName: string; relationName: string; referencedTableName: string; }[]; indexes: Record; foreignKeys: Record; compositePrimaryKeys: Record; uniqueConstraints: Record; checkConstraints: Record; description?: string | undefined; }>; schemas: Record; views: Record; isExisting: boolean; algorithm: "undefined" | "merge" | "temptable"; sqlSecurity: "definer" | "invoker"; description?: string | undefined; definition?: string | undefined; withCheckOption?: "local" | "cascaded" | undefined; }>; projectId: string; version: "5"; _meta: { columns: Record; tables: Record; }; internal?: { tables?: Record; } | undefined> | undefined; indexes?: Record; } | undefined> | undefined; } | undefined; }, { dialect: "mysql"; tables: Record; indexes: Record; foreignKeys: Record; compositePrimaryKeys: Record; description?: string | undefined; relations?: { type: "many" | "one"; fieldName: string; relationName: string; referencedTableName: string; }[] | undefined; uniqueConstraints?: Record | undefined; checkConstraints?: Record | undefined; }>; schemas: Record; version: "5"; _meta: { columns: Record; tables: Record; }; views?: Record; isExisting: boolean; algorithm: "undefined" | "merge" | "temptable"; sqlSecurity: "definer" | "invoker"; description?: string | undefined; definition?: string | undefined; withCheckOption?: "local" | "cascaded" | undefined; }> | undefined; projectId?: string | undefined; internal?: { tables?: Record; } | undefined> | undefined; indexes?: Record; } | undefined> | undefined; } | undefined; }>; type MySqlSchemaInternal = TypeOf; type Snapshot = MySqlSchemaInternal; type DrizzleObjects = Omit, typeof DrizzleLab>; /** * Map the Drizzle objects from the Drizzle schema. * @param drizzleSchema - The Drizzle schema to map the objects from. * @returns Drizzle objects */ declare function schemaToDrizzleObjects(drizzleSchema: DrizzleSchema): { tables: AnyMySqlTable[]; schemas: MySqlSchema[]; views: MySqlView[]; relations: drizzle_orm.TableRelationalConfig[]; [DrizzleLab]: { drizzleRelations: Relations>>[]; }; }; declare function schemaToSnapshot(schema: DrizzleSchema, config?: PartialConfig): { dialect: "mysql"; projectId: string; tables: Record; indexes: Record; foreignKeys: Record; compositePrimaryKeys: Record; uniqueConstraints: Record; checkConstraints: Record; relations: { type: "many" | "one"; fieldName: string; relationName: string; referencedTableName: string; }[]; description?: string | undefined; }>; version: "5"; schemas: Record; _meta: { columns: Record; tables: Record; }; views: Record; algorithm: "undefined" | "merge" | "temptable"; sqlSecurity: "definer" | "invoker"; isExisting: boolean; description?: string | undefined; withCheckOption?: "local" | "cascaded" | undefined; definition?: string | undefined; }>; internal?: { indexes?: Record; } | undefined> | undefined; tables?: Record; } | undefined> | undefined; } | undefined; }; /** * Generate a snapshot from the Drizzle objects. * @param drizzleObjects - The Drizzle objects to generate a snapshot from. * @param config - The Drizzle configuration to use for the snapshot. * @returns A snapshot of the Drizzle objects. */ declare function drizzleObjectsToSnapshot({ tables, views, relations, schemas }: DrizzleObjects, config?: PartialConfig): Snapshot; export { type DrizzleObjects as D, type MySqlSchemaInternal as M, type Snapshot as S, schemaToSnapshot as a, drizzleObjectsToSnapshot as d, schemaToDrizzleObjects as s };