US 11,709,807 B2
Optimized tenant schema generation
Howard Proctor, Raleigh, NC (US)
Assigned to Red Hat, Inc., Raleigh, NC (US)
Filed by Red Hat, Inc., Raleigh, NC (US)
Filed on Apr. 27, 2021, as Appl. No. 17/241,507.
Prior Publication US 2022/0342856 A1, Oct. 27, 2022
Int. Cl. G06F 16/21 (2019.01); G06F 16/242 (2019.01)
CPC G06F 16/211 (2019.01) [G06F 16/214 (2019.01); G06F 16/2433 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A system, comprising:
a memory; and a processor in communication with the memory, wherein the processor is configured to:
receive, at an application executed on a virtual machine, a request to create a tenant schema within a database, wherein the database includes one or more tenant schemas associated with one or more tenants;
in response to the request, create the tenant schema associated with a tenant of the one or more tenants, wherein the tenant schema is empty, wherein the one or more tenants have at least one of common access to or privileges to the database;
updating the empty tenant schema according to migration files of other tenant schemas;
determine whether the database includes a template schema, wherein the template schema tracks a previous state and a current state of each tenant schema of the tenant schemas on the database to create new tenant schemas;
upon determining the template schema exists, send by the application executed on the virtual machine, a copy command to the database to copy the template schema to the tenant schema associated with the tenant; and
upon determining that the database lacks a template tenant, migrate a second tenant schema to a new tenant schema, wherein the migration of the second tenant schema includes copying modifications made to another tenant schema, and wherein the migration comprises recording a state of migrations of the other tenant schemas on the database to resolve a state of the template schema.