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. 

{
        throw Exception("There is no DETACH TABLE PERMANENTLY query for Database" + getEngineName(), ErrorCodes::NOT_IMPLEMENTED);
    }
    
    virtual void renameTable(
        ContextPtr ,
        const String & ,
        IDatabase & ,
        const String & ,
        bool ,
        bool )
    {
        throw Exception(getEngineName() + ": renameTable() is not supported", ErrorCodes::NOT_IMPLEMENTED);
    }
    using ASTModifier = std::function<void(IAST &)>;
    
    
    virtual void alterTable(
        ContextPtr ,
        const StorageID & ,
        const StorageInMemoryMetadata & )
    {
        throw Exception(getEngineName() + ": alterTable() is not supported", ErrorCodes::NOT_IMPLEMENTED);
    }
    
    virtual time_t getObjectMetadataModificationTime(const String & ) const