While testing Cloudflare D1 for a Schemity post, I rebuilt a parent table with defer_foreign_keys on. The two orders under it were deleted.
D1 does not let you switch foreign keys off. Cloudflare's docs offer deferral instead, and deferral only postpones the check for violations. DROP TABLE still deletes the parent's rows first, and ON DELETE CASCADE still fires.
One customer, two orders, the usual create, copy, drop, rename. The customer came back under the new table.
orders_after: 0. No error, and the request reported success.
https://schemity.com/blog/cloudflare-d1-schema-diagram-local-export-or-remote/

schemity.comCloudflare D1 Schema Diagram: Draw It From the Local Wrangler File, an Export, or the Remote Database? - SchemityCloudflare D1 keeps three schemas that drift apart. Schemity measured what the local wrangler file, an export and the remote database each show, and which to draw.
commit 84eec4c