#[Failed] Recreate Same Name Relationship Attribute Only Self-Hosted

1 messages · Page 1 of 1 (latest)

tawdry totem
#

I am creating a relationship. It works properly on Client and Server SDK side. When I delete this attribute and create it again with the same name, I get a “Failed” warning.

NOTE : Error only on self-hosted

Steps

2 - Data entry with relationship
3 - Delete Relationship attribute
4 - Re-add Relationship
5 - Added to the list but “Failed”
6 - When I check the data I see that the old attributes are still selected :)```

I found this
```After step 3, in the background the attribute is deleted from the list, but the attribute values remain in the rows```

**Tested**
Live Server 1.5.5    [❌ Not working]
Test Server 1.5.5    [❌ Not working]
Zero installation 1.5.5 [❌  Not working]
Cloud [✅  Working]
stray wadi
tawdry totem
#

Hi @stray wadi ,
I created an issue, do you think there is anything missing?

stray wadi
#

Specify that it doesn't happen in cloud

tawdry totem
stray wadi
shrewd nebula
tawdry totem
#

I then performed a test installation on W10 and the result was the same.

shrewd nebula
tawdry totem
#

Sorry for the delay @shrewd nebula . I did a zero installation because I did a lot of experiments. I got the same error by running the same scenario.

[Worker] Worker 0 is ready!
Worker databases  started
[Job] Received Job (664765e033ba47.07296409).
[Job] (664765e033ba47.07296409) successfully run.
[Job] Received Job (6647662b3e2678.57408963).
[Job] (6647662b3e2678.57408963) successfully run.
[Job] Received Job (66476637509cb6.39113200).
[Job] (66476637509cb6.39113200) successfully run.
[Job] Received Job (6647664f799d27.97165099).
[Job] (6647664f799d27.97165099) successfully run.
[Job] Received Job (6647666cab8fd3.94867069).
[Job] (6647666cab8fd3.94867069) successfully run.
[Job] Received Job (6647667b00c5f3.73128274).
SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'blogCategory'
[Job] (6647667b00c5f3.73128274) successfully run.
tawdry totem
#

This line happened when adding a relationship with the same name

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'blogCategory'
#

The value in the old row is still in the row, I did not add new, old record

tawdry totem
#

When I check via MariaDB, I see that the column has not really been deleted

tawdry totem
#

There are also remnants in the _1__metadata table

|  31 | database_1_collection_3 | 2024-05-17 20:36:26.080 | 2024-05-17 20:36:26.080 | ["create(\"any\")","read(\"any\")","update(\"any\")","delete(\"any\")"] | database_1_collection_3 | [{"$id":"title","key":"title","type":"string","size":36,"required":false,"default":null,"signed":true,"array":false,"format":"","formatOptions":[],"filters":[]},{"$id":"content","key":"content","type":"string","size":100,"required":false,"default":null,"signed":true,"array":false,"format":"","formatOptions":[],"filters":[]}] | [{"$id":"_index_blogCategory","key":"_index_blogCategory","type":"key","attributes":["blogCategory"],"lengths":[],"orders":[]}]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |                0 |
shrewd nebula
#

oye. looks like the fix will actually be in 1.5.6