Each container should contain a schema_versions table, to record what migrations have been run within the Container.
For example, each of the N Company containers will have the same internal schema (say, files, messages).
When we want to migrate the files table across all company_* databases, the company_n/files table (located in the company_n database) is migrated from version X to X+1.
However, since migration of all company_n databases (from X to X+1) can be a lengthy process, we need to achieve zero-downtime with the container schema migrations.
This means that each company_1/files (e.g. version X+1) and company_2/files (e.g. version X) may be at different schema versions at any single time, and that the application should deal with this issue without hiccups.
Each container should contain a
schema_versionstable, to record what migrations have been run within the Container.For example, each of the N
Companycontainers will have the same internal schema (say,files,messages).When we want to migrate the
filestable across allcompany_*databases, thecompany_n/filestable (located in thecompany_ndatabase) is migrated from versionXtoX+1.However, since migration of all
company_ndatabases (fromXtoX+1) can be a lengthy process, we need to achieve zero-downtime with the container schema migrations.This means that each
company_1/files(e.g. versionX+1) andcompany_2/files(e.g. versionX) may be at different schema versions at any single time, and that the application should deal with this issue without hiccups.