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. 

{
            compressed.next();
            plain->next();
        }
    };
    using FileStreams = std::map<String, Stream>;
    FileStreams streams;
    using SerializeState = ISerialization::SerializeBinaryBulkStatePtr;
    using SerializeStates = std::map<String, SerializeState>;
    SerializeStates serialize_states;
    ISerialization::OutputStreamGetter createStreamGetter(const NameAndTypePair & name_and_type);
    void writeData(const NameAndTypePair & name_and_type, const IColumn & column);
};
void LogSink::consume(Chunk chunk)
{
    auto block = getHeader().cloneWithColumns(chunk.detachColumns());
    metadata_snapshot->check(block, true);
    for (auto & stream : streams | boost::adaptors::map_values)
        stream.written = false;
    for (size_t i = 0; i < block.columns(); ++i)
    {
        const ColumnWithTypeAndName & column = block.safeGetByPosition(i);
        writeData(NameAndTypePair(column.name, column.type), *column.column);
    }
}
void LogSink::onFinish()