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. 

}
        checkTableStructure(replica_path, metadata_snapshot);
        checkParts(skip_sanity_checks);
        if (current_zookeeper->exists(replica_path + "/metadata_version"))
        {
            metadata_version = parse<int>(current_zookeeper->get(replica_path + "/metadata_version"));
        }
        else
        {
            
            
            
            
            
            Coordination::Stat metadata_stat;
            current_zookeeper->get(zookeeper_path + "/metadata", &metadata_stat);
            metadata_version = metadata_stat.version;
        }
        
        
        clearOldTemporaryDirectories(0, {"tmp_", "delete_tmp_", "tmp-fetch_"});
        clearOldWriteAheadLogs();
        if (getSettings()->merge_tree_enable_clear_old_broken_detached)
            clearOldBrokenPartsFromDetachedDirecory();
    }
    createNewZooKeeperNodes();
    syncPinnedPartUUIDs();
    createTableSharedID();
}
String StorageReplicatedMergeTree::getDefaultZooKeeperPath(const Poco::Util::AbstractConfiguration & config)