import type { BUN_MARIADB_FieldSchemaType, BUN_MARIADB_TableSchemaType, BunMariaDBConfig } from "../../types"; export type DesiredForeignKey = { name: string; column: string; refTable: string; refColumn: string; cascadeDelete: boolean; cascadeUpdate: boolean; field: BUN_MARIADB_FieldSchemaType; }; export type LiveForeignKey = { name: string; column: string; refTable: string; refColumn: string; deleteRule: string; updateRule: string; }; export declare function grabDesiredForeignKeys(table: BUN_MARIADB_TableSchemaType): DesiredForeignKey[]; export declare function grabLiveForeignKeys({ tableName, config, }: { tableName: string; config?: BunMariaDBConfig; }): Promise; export declare function dropForeignKey({ tableName, constraintName, config, }: { tableName: string; constraintName: string; config?: BunMariaDBConfig; }): Promise; export declare function dropForeignKeysOnColumns({ tableName, columns, config, }: { tableName: string; columns: string[]; config?: BunMariaDBConfig; }): Promise; /** * Drop foreign keys that are removed from schema or need recreation * (name/cascade/target changed). Run before index cleanup. */ export declare function dropObsoleteForeignKeys({ table, config, }: { table: BUN_MARIADB_TableSchemaType; config?: BunMariaDBConfig; }): Promise; /** * Ensure all desired foreign keys exist. Run after indexes/uniques. */ export declare function ensureForeignKeys({ table, config, }: { table: BUN_MARIADB_TableSchemaType; config?: BunMariaDBConfig; }): Promise; export default function syncForeignKeys({ table, config, }: { table: BUN_MARIADB_TableSchemaType; config?: BunMariaDBConfig; }): Promise;