public virtual void Upsert(IStructureSchema structureSchema, IDbClient dbClient, bool allowDynamicSchemaCreation, bool allowDynamicSchemaUpdates)
        {
            if (!allowDynamicSchemaCreation && !allowDynamicSchemaUpdates)
            {
                return;
            }

            var modelInfo = dbClient.GetModelTablesInfo(structureSchema);

            if (allowDynamicSchemaUpdates)
            {
                IndexesDbSchemaSynchronizer.Synchronize(structureSchema, dbClient, modelInfo.GetIndexesTableNamesForExisting());

                if (modelInfo.Statuses.UniquesTableExists)
                {
                    UniquesDbSchemaSynchronizer.Synchronize(structureSchema, dbClient);
                }
            }

            if (!allowDynamicSchemaCreation || modelInfo.Statuses.AllExists)
            {
                return;
            }

            foreach (var sql in GenerateSql(structureSchema, modelInfo))
            {
                dbClient.ExecuteNonQuery(sql, new DacParameter(DbSchemaInfo.Parameters.EntityNameParamPrefix, structureSchema.Name));
            }
        }