feat: support tenant database routing

This commit is contained in:
richjohnrambo
2026-08-13 15:07:06 +08:00
parent 31f82d9c41
commit 92d0066a02
8 changed files with 2253 additions and 1317 deletions
@@ -1,3 +1,14 @@
-- DEPRECATED.
--
-- 2026-08-13: the multi-tenant technical direction changed to
-- "control database + one business database per tenant". Do not execute this
-- shared-table tenant_id migration and do not continue adding tenant_id to
-- tenant business tables.
--
-- New design document:
-- docs/IM-独立库多租户改造方案.md
--
-- Original note:
-- MySQL multi-tenant schema migration draft.
-- REVIEW ONLY: do not execute before the application is fully tenant-aware.
-- Target: MySQL 8.0, final schema version 119.