Application-layer tenant scoping fails silently the day you forget a WHERE clause. PostgreSQL composite foreign keys turn a cross-user reference into a constraint violation the database rejects — here is the underdocumented references/2 :with option, the two migration patterns for CASCADE and SET NULL, the MATCH SIMPLE trick for nullable columns, and a test that proves the constraint lives in the DB.
Engineering Blog
Engineering deep-dives from the SlashFeed team — Elixir, Phoenix, and how the product is built.
all
a11y
accessibility
ai
api
architecture
authentication
automations
beam
blog
boruta
browserless
build-in-public
cassandra
circuit-breaker
claude
cron
css
css-selectors
databases
debugging
discovery
dns
dnsmasq
documentation
driver-js
ecto
elixir
fido2
finch
floki
foreign-keys
hammer
headless-browser
hmac
hooks
images
javascript
keyboard
liveview
llm
markdown
mcp
media
meta
mfa
migrations
monitoring
multi-tenancy
nimble_publisher
nimble_totp
oauth2
oban
oidc
onboarding
open-graph
passkeys
performance
philosophy
phoenix
pkce
podcasts
postgres
postgresql
privoxy
ranking
rate-limiting
rss
scraping
security
seo
svg
syntax-highlighting
tor
totp
upsert
ux
wax
wcag
webauthn
webhooks
xandra
Enforcing multi-tenancy at the database layer in Ecto