From 6adacd981f40a1872b6429291cb333494eadc5e9 Mon Sep 17 00:00:00 2001 From: Phil Date: Thu, 3 Sep 2026 11:59:47 -0400 Subject: [PATCH] Update e5fe7f8bcf62_add_tenant_id_primitive.py remove non-OSS facing docstring; leaving the #ai comment for now --- .../e5fe7f8bcf62_add_tenant_id_primitive.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/migrations/versions/e5fe7f8bcf62_add_tenant_id_primitive.py b/migrations/versions/e5fe7f8bcf62_add_tenant_id_primitive.py index 2b58e2d1..e621b7ea 100644 --- a/migrations/versions/e5fe7f8bcf62_add_tenant_id_primitive.py +++ b/migrations/versions/e5fe7f8bcf62_add_tenant_id_primitive.py @@ -8,19 +8,6 @@ Adds ``tenant_id`` as a first-class primitive to the data model: a new ``tenants`` table and a ``tenant_id`` column (plus tenant-scoped composite PKs / uniques / FKs / indexes) on every tenant-scoped table, matching the declarative models MINUS physical partitioning. - -Scope: this is the OSS / self-host (prosumer) migration. It transforms an -existing single-tenant, non-partitioned schema in place and backfills every -row to a single default tenant. It intentionally does NOT create HASH -partitions — ``postgresql_partition_by`` in the models is a create-time hint -that only the (internal, prod-only) shared-schema bootstrap honours; -partitioning is transparent at query time, so the declarative models run -correctly against these plain tables. - -Prod is NOT migrated by this script: the shared partitioned schema is built by -the bootstrap and prod is ``alembic stamp``-ed past this revision. The guard at -the top of ``upgrade()`` also makes this a no-op wherever the tenant schema -already exists (prod, or a re-run), so it is idempotent. """ from collections.abc import Sequence