Back

Attributes migration error from cloud to self-hosted

  • 1
  • Self Hosted
  • Cloud
wonderfulcheese
24 Oct, 2023, 07:08

Hi, I was migrating the data from cloud to a self-hosted instance. Almost all the data does migrate successfully except for a few attributes. Those two attributes are of type double (if that helps).

TL;DR
The user is experiencing an error while migrating attributes from a cloud to a self-hosted instance. The error occurs specifically when the attribute value is 0 or a single digit. The user suspects that the issue may be due to the attribute expecting "0.0" instead of "0". They suggest checking the database container logs and the JSON response from the list collections API for more information. The attribute causing the error is named "rating" and is a float with a default value of 0 and no min/max values defined. The user is not familiar with Docker and asks for guidance on accessing the logs of the database worker and the app
wonderfulcheese
24 Oct, 2023, 08:03

The same issue occurs when migrating from one self-hosted instance to other. But this time only one attribute error and that to it is of type double (float).

Drake
24 Oct, 2023, 17:35

interesting...any other logs?

Drake
24 Oct, 2023, 17:35

maybe in the appwrite-worker-migrations container?

wonderfulcheese
24 Oct, 2023, 17:50

This is the error I get in the migration details popup: "Failed to transfer resource ':attribute' with message 'Attribute creation timeout'"

wonderfulcheese
24 Oct, 2023, 17:51

How can I get their logs? Not much familiar with Docker

Drake
24 Oct, 2023, 17:55

What exactly is the attribute? The databases worker might also have some helpful logs too

wonderfulcheese
24 Oct, 2023, 17:59

The attribute is a float with default value 0 and no min and max values defined (since they aren't mandatory while creating the attribute)

Drake
24 Oct, 2023, 18:00

what's the key?

wonderfulcheese
24 Oct, 2023, 18:04

The key is "rating"

Drake
24 Oct, 2023, 18:05

ya that seems normal..

Drake
24 Oct, 2023, 18:06

there should be some logs about why the attribute failed to create. another thing you check is the JSON response from the list collections API. there should be a log attribute on the attribute object

wonderfulcheese
24 Oct, 2023, 18:12
TypeScript
   {
               "databaseInternalId":"1",
               "databaseId":"65265b9d65617f5e0e9c",
               "collectionInternalId":"5",
               "collectionId":"ServiceProviders",
               "key":"rating",
               "type":"double",
               "status":"failed",
               "error":"Default value 0 does not match given type double",
               "size":0,
               "required":false,
               "default":0,
               "signed":true,
               "array":false,
               "format":"floatRange",
               "formatOptions":{
                  "min":-1.7976931348623157e+308,
                  "max":1.7976931348623157e+308
               },

I went through the database container logs and this is what I found

wonderfulcheese
24 Oct, 2023, 18:13

I think it was expecting "0.0" as the value but instead it got "0". Hence it failed

Drake
24 Oct, 2023, 18:17

interesting...

Drake
24 Oct, 2023, 18:17

i thought it was going to fail on max/min 😆

wonderfulcheese
24 Oct, 2023, 18:20

Initially I too thought the same because when I tried editing the failed attribute from the console, it was saying that the min and max value is invalid

wonderfulcheese
24 Oct, 2023, 18:21

Another thing to note is that it fails only when the value is 0 or single digit and not some other double

Drake
24 Oct, 2023, 18:26

thanks for the insight

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more