Ordinary database engine is deprecated but there is no simple mean to change database engine to Atomic for existing databases.

Possible options:
- ALTER DATABASE MODIFY ENGINE query.
- Flag that triggers migration at ClickHouse startup.

The latter should be easier to implement. 

{
    const auto & settings = local_context->getSettingsRef();
    auto extension = src_storage_cluster->getTaskIteratorExtension(local_context);
    
    auto src_cluster = src_storage_cluster->getCluster(local_context);
    
    String query_str;
    {
        WriteBufferFromOwnString buf;
        IAST::FormatSettings ast_format_settings(buf,  true);
        ast_format_settings.always_quote_identifiers = true;
        query.IAST::format(ast_format_settings);
        query_str = buf.str();
    }
    QueryPipeline pipeline;
    ContextMutablePtr query_context = Context::createCopy(local_context);
    ++query_context->getClientInfo().distributed_depth;