🗄️
Database

Designing schema-per-site

0views0comments

The multi-tenant model: a dedicated schema per site plus a shared core.

Overview

Every SITESAFF website gets its own Postgres schema (site_<slug>), fully isolating its content data.

The core schema

Shared tables (users, organizations, sites, roles…) live in the core schema, not duplicated per site.

Per-site querying

Requests carry an X-Site-Id header; middleware resolves the matching schema and sets the search_path for the current transaction.

Tags

databasemulti-tenant

Docs

Back

Category

Database · Docs

Designing schema-per-site | WIKI IT