Back

Migration from 1.3.4 -> 1.3.7 gives error

  • 0
  • Tools
  • Self Hosted
Vedsaga
11 Jul, 2023, 18:01

I have script for 18K doc but there are some other Doc for which I haven't wrote script

TL;DR
The user is experiencing an error when trying to update the relationship between documents during a migration from version 1.3.4 to 1.3.7. The error message says "Invalid value for relationship" and provides a file and line number where the error occurred. The user has not provided the exact code they are using, but suggests that the issue may be related to making the request from the client side. They are willing to share a script tomorrow to provide more information. Other users in the thread suggest trying to reproduce the issue with minimal steps and documentation. No solution is provided in the thread.
Vedsaga
11 Jul, 2023, 18:02

I guess, let me try again from fresh because relation-ship part is crirtical so for that I can try

Vedsaga
11 Jul, 2023, 18:41

jsut complted creating everything from scratch and seems still issue with Upadting Doc

Drake
11 Jul, 2023, 18:58

I'll need exact steps to try and reproduce

Vedsaga
11 Jul, 2023, 18:58

yaa sure, I can share the json file but it's huge ( 1000+ line)

Vedsaga
11 Jul, 2023, 18:58
Vedsaga
11 Jul, 2023, 18:59

this is the exact json, and then I am not sure how would you able to test updating from Client πŸ€”

Vedsaga
11 Jul, 2023, 19:00

because from the console it will work

Drake
11 Jul, 2023, 19:00

do you have minimal reproduction steps for creating hte documents and whatnot?

Vedsaga
11 Jul, 2023, 19:02

umm, I haven't back-traced it I mean, there is nested relatinship so that is not de-coupled

Drake
11 Jul, 2023, 19:02

i really need a way to reproduce the problem...

Vedsaga
11 Jul, 2023, 19:03

I mean, this version I shared will reproduce it but It's not minimal that's the issue

Vedsaga
11 Jul, 2023, 19:06

just need tp deploy the collection, and create the document for Business Collection and then for the create document for,

  1. Company
  2. Brand
  3. Currency
  4. Unit
  5. HSN-Code
  6. Product
  7. Product Varaint
  8. Inventory <--------------- while trying to update this issue is happening...
  9. Inventory Log

here, 1, 2, 3 represent relationship depth

Drake
11 Jul, 2023, 19:06

im not sure if it will if i don't have the steps for the document creation

Drake
11 Jul, 2023, 19:07

sorry i don't understand these steps

Vedsaga
11 Jul, 2023, 19:07

umm, I could one thing just write a simple function

Vedsaga
11 Jul, 2023, 19:07

but, only thing I am not sure is how would you test the update ?

Vedsaga
11 Jul, 2023, 19:09

any comment on this one?

Drake
11 Jul, 2023, 19:09

you can share a sample api request for an update...or give some instructions

Drake
11 Jul, 2023, 19:10

im going to spin it up and try and make the request

Vedsaga
11 Jul, 2023, 19:10

I guess request need to be made from the client side... but let me first share small script to populate the data

Vedsaga
11 Jul, 2023, 20:07

can I share the script tomorrow morning. It's almost 1:36AM and feeling dazy brain seems to stop working, I am almost done with script just few twicks needing

Vedsaga
13 Jul, 2023, 06:41

trying to write script to update the relationship,

TypeScript
appwrite  | [Error] Method: PATCH
appwrite  | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents/:documentId
appwrite  | [Error] Type: Exception
appwrite  | [Error] Message: Invalid value for relationship
appwrite  | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
appwrite  | [Error] Line: 2995
appwrite  | [Error] Timestamp: 2023-07-13T06:37:19+00:00
appwrite  | [Error] Method: PATCH
appwrite  | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents/:documentId
appwrite  | [Error] Type: Exception
appwrite  | [Error] Message: Invalid value for relationship
appwrite  | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
appwrite  | [Error] Line: 2995
appwrite  | [Error] Timestamp: 2023-07-13T06:37:48+00:00
appwrite  | [Error] Method: PATCH
appwrite  | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents/:documentId
appwrite  | [Error] Type: Exception
appwrite  | [Error] Message: Invalid value for relationship
appwrite  | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
appwrite  | [Error] Line: 2995

getting this exception

Drake
13 Jul, 2023, 14:52

what are you passing? what's your code?

Vedsaga
13 Jul, 2023, 14:53

I am trying to write script to share with you, and it's quite mess because it's in python and written in hurry.

Btw, I was trying to update the id ( i mean trying to linked the one doc with another)

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