/** * Audit-subsystem migration hardening. * * `audit.events` is an append-only forensic sink, so its DDL gets two * guarantees no other subsystem needs: * * 1. Creation is idempotent — `CREATE SCHEMA/TABLE/INDEX` targeting the * audit subsystem is rewritten to the `IF NOT EXISTS` form, so a * re-emission after a broken snapshot lineage can never collide with * objects the database already holds (SQLSTATE 42P06/42P07). * 2. Destruction is vetoed — generated `DROP` statements against the * audit schema, table, or indexes are removed outright. Purging * evidence must be a deliberate operator action, never a generated * migration. (The emission latch in utils/audit-latch.ts prevents the * drop from being generated in the first place; this is defense in * depth for lineages that already diverged.) * * Deliberately NOT in migration-reorder.ts: that module's contract is * "reorders dependency-linked constraint statements, byte-identical * otherwise", while this transform rewrites statement text. The runner * applies it only to migration files generated in the current compile — * rewriting an already-applied file would drift its migrator hash. */ /** * Harden one migration file's SQL. Byte-identical when the file touches * nothing in the audit subsystem; idempotent (f(f(x)) === f(x)). */ export declare function hardenAuditMigrationSql(sql: string): string; //# sourceMappingURL=audit-migration-hardening.d.ts.map