Skip to content

ubcli: support multitenancy migrations

Andrii Bezuglyi requested to merge feat/migrate_tenants2 into master

Support multitenancy migrations by:

  • run DDL stage under DB owner user, skip data, regular scripts and update model versions
  • run tenant data stage under MT (regular) user, in a loop

Introduced new command "migrateTenants" Command "migrate" support new options: "-noscripts", "noversions"

Table "ub_migration" now has "multitenancy" mixin enabled:

  • *DDL scripts always executed only DB owner and saved with mi_tenantID=0
  • all other scripts executed normally, in a loop for every tenant and saved with mi_tenantID=

Merge request reports

Loading