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. 

}
            catch (Coordination::Exception & e)
            {
                if (!is_first_replica && e.code == Coordination::Error::ZNONODE)
                    throw Exception("Table " + zookeeper_path + " was suddenly removed.", ErrorCodes::ALL_REPLICAS_LOST);
                else
                    throw;
            }
            if (!is_first_replica)
                createReplica(metadata_snapshot);
        }
        catch (...)
        {
            
            dropIfEmpty();
            throw;
        }
    }
    else
    {
        
        String replica_metadata;
        const bool replica_metadata_exists = current_zookeeper->tryGet(replica_path + "/metadata", replica_metadata);
        if (!replica_metadata_exists || replica_metadata.empty())
        {
            
            other_replicas_fixed_granularity = checkFixedGranularityInZookeeper();
            ReplicatedMergeTreeTableMetadata current_metadata(*this, metadata_snapshot);
            current_zookeeper->createOrUpdate(replica_path + "/metadata", current_metadata.toString(),
                zkutil::CreateMode::Persistent);