The idempotency transform MUST write a statement in its natural form where the dialect has one (ADD COLUMN IF NOT EXISTS, DROP COLUMN IF EXISTS, DROP TABLE IF EXISTS, DROP INDEX IF EXISTS, DROP CONSTRAINT IF EXISTS); MUST guard it by a probe where it has none (adding a constraint, renaming a table, a column, a constraint or an index, dropping a constraint or a column the dialect cannot drop in the natural form); and MUST leave a statement that is idempotent already (CREATE TABLE IF NOT EXISTS, an upsert, a delete by key, SET NOT NULL, SET DEFAULT) as it is.
Enforced (check): .github: cd commons/data && bun run verify — suite/idempotency.test.ts: a statement is natural where the dialect has a form, guarded where it has none, and the step says which
Proved by: data/suite/idempotency.test.ts
Written in: data/sql/extensions/idempotency/transform.ts
Tests: passed: suite/idempotency.test.ts a statement is natural where the dialect has a form, guarded where it has none, and the st
Cited by: Data, sql/extensions/idempotency/transform