Foreign keys from the tenant tables to auth_users (BOU-611). Without them a user still in a tenant could be hard-deleted, leaving memberships that point at nobody. Idempotent; skipped where auth_users is absent (no user module) or the engine cannot add a foreign key to a table (SQLite, which refuses tenancy anyway).
Foreign keys from the tenant tables to auth_users (BOU-611). Without them a user still in a tenant could be hard-deleted, leaving memberships that point at nobody. Idempotent; skipped where auth_users is absent (no user module) or the engine cannot add a foreign key to a table (SQLite, which refuses tenancy anyway).
(add-clean-foreign-keys! ctx)Boot: add each missing key whose table has no row pointing at no user, and change no rows. Returns the keys left off, each naming why.
Boot: add each missing key whose table has no row pointing at no user, and change no rows. Returns the keys left off, each naming why.
(ensure-foreign-keys! ctx)migrate up: clear departed memberships, set NULL what an ON DELETE SET NULL
key would have, refuse naming them any other rows that point at no user, and
add the missing keys.
`migrate up`: clear departed memberships, set NULL what an ON DELETE SET NULL key would have, refuse naming them any other rows that point at no user, and add the missing keys.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |