```
select name, value, last_error_message from system.errors where name = 'FILE_DOESNT_EXIST';
0 rows in set. Elapsed: 0.001 sec.

select * from system.tables format Null;
select * from system.tables format Null;
select * from system.tables format Null;

select name, value, last_error_message from system.errors where name = 'FILE_DOESNT_EXIST';
┌─name──────────────┬─value─┬─last_error_message──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ FILE_DOESNT_EXIST │   198 │ Cannot open file /var/lib/clickhouse/store/bff/bff731ca-ed14-404b-bff7-31caed14904b/zeros_mt.sql, errno: 2, strerror: No such file or directory │
└───────────────────┴───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```
else if (typeid_cast<DatabaseAtomic *>(this) && typeid_cast<DatabaseOrdinary *>(&to_database))
            from_atomic_to_ordinary = true;
        else if (dynamic_cast<DatabaseAtomic *>(this) && typeid_cast<DatabaseOrdinary *>(&to_database) && getEngineName() == "Replicated")
            from_atomic_to_ordinary = true;
        else
            throw Exception("Moving tables between databases of different engines is not supported", ErrorCodes::NOT_IMPLEMENTED);
    }
    auto table_data_relative_path = getTableDataPath(table_name);
    TableExclusiveLockHolder table_lock;
    String table_metadata_path;
    ASTPtr attach_query;
    
    StoragePtr table = tryGetTable(table_name, getContext());
    detachTable(table_name);
    UUID prev_uuid = UUIDHelpers::Nil;
    try
    {
        table_lock = table->lockExclusively(
            local_context->getCurrentQueryId(), local_context->getSettingsRef().lock_acquire_timeout);
        table_metadata_path = getObjectMetadataPath(table_name);
        attach_query = parseQueryFromMetadata(log, local_context, table_metadata_path);
        auto & create = attach_query->as<ASTCreateQuery &>();
        create.database = to_database.getDatabaseName();
        create.table = to_table_name;
        if (from_ordinary_to_atomic)
            create.uuid = UUIDHelpers::generateV4();
        if (from_atomic_to_ordinary)
            std::swap(create.uuid, prev_uuid);
        if (auto * target_db = dynamic_cast<DatabaseOnDisk *>(&to_database))
            target_db->checkMetadataFilenameAvailability(to_table_name);