import type { Change } from "./types.js"; /** * Thrown when a foreign key's resolved ON DELETE action is "set-null" but one * or more of its FK columns map to a NOT NULL field (@required: true). * * ON DELETE SET NULL requires the FK column(s) to be nullable — Postgres and * SQLite both reject the combination at DDL execution time. * * Fix: either remove @required from the FK field(s), or override the * relationship with @onDelete: "restrict" / "no-action" to avoid set-null. */ export declare class SetNullNotNullableError extends Error { readonly name = "SetNullNotNullableError"; readonly entityName: string; readonly constraintName: string; readonly offendingFields: string[]; constructor(entityName: string, constraintName: string, offendingFields: string[]); } export declare class BlockedChangesError extends Error { readonly name = "BlockedChangesError"; readonly blocked: Change[]; readonly enableHints: string[]; constructor(blocked: Change[]); } /** * #258 — a table whose live PRIMARY KEY differs from the metadata identity cannot be * migrated: the diff/emit has no primary-key change kind, so the difference degrades * silently into an add-column + drop-column (the old PK column is dropped, the new one * is never made PK), leaving the table with no primary key and breaking every foreign * key that references it at apply time. Migration generation detects the move and throws * this instead of emitting un-appliable SQL (detect-and-refuse; the #226→#241 arc for D1 * FK cascades is the precedent). A pure column RENAME is NOT a key move — the engine * preserves the PK through a `RENAME COLUMN` — and does not trigger this. */ export declare class PrimaryKeyChangeError extends Error { readonly name = "PrimaryKeyChangeError"; readonly table: string; readonly livePrimaryKey: string[]; readonly expectedPrimaryKey: string[]; readonly schema?: string; constructor(table: string, livePrimaryKey: string[], expectedPrimaryKey: string[], schema?: string); } //# sourceMappingURL=errors.d.ts.map