dojo icon indicating copy to clipboard operation
dojo copied to clipboard

After changing the key structure of a model, it's not possible to migrate

Open ponderingdemocritus opened this issue 1 year ago • 11 comments

This might be a limitation in the structure. I don't think this would happen often but it will need to be flagged in the book if it will not be fixed.

Screenshot 2024-05-07 at 06 15 51

Reproduce:

  1. Migrate a model
  2. Change the keys
  3. Try migrate again

@kariy

ponderingdemocritus avatar May 06 '24 20:05 ponderingdemocritus

Can you assign this to me please? @ponderingdemocritus

jancris100 avatar May 07 '24 15:05 jancris100

This issue has someone already assigned ?

jancris100 avatar May 14 '24 00:05 jancris100

Hey, I will love to handle this issue. Can it be assigned to me?!

abdegenius avatar May 23 '24 10:05 abdegenius

@abdegenius @jancris100 sorry for the delay. One of you is up to check if the problem is still present on the latest alpha and try to fix it?

glihm avatar Jun 10 '24 15:06 glihm

Can this be assigned to me so i can handle it? Thank you.. an any other issue you got please assign them to me

abdegenius avatar Jun 11 '24 13:06 abdegenius

Can this be assigned to me so i can handle it? Thank you.. an any other issue you got please assign them to me

Would you please give an idea of how you plan to handle that? Then I'll assign. 👍 You may also check if in the 0.7.1 this is still a bug.

glihm avatar Jun 19 '24 22:06 glihm

I will first check the migrations files and study each relations.. if one table is references to another and data is loaded to the parent it gives rise to this issues.. the way the next structure was added can give raise to this problem as well each key migration should be done as a single so doing a rollback becomes easy. JUST A LOOK THROUGH THE WHOLE CODEBASE CAN GIVE A CLEAR IDEA OF WHAT IS UP

abdegenius avatar Jun 22 '24 07:06 abdegenius

@abdegenius I think there's more implications here, but please git it a shot and let's know how it goes. If you have any question please don't hesitate here or to reach out on discord.

glihm avatar Jun 22 '24 16:06 glihm

You are right, can't seem to figure it out! :) still checking tho

abdegenius avatar Jun 28 '24 06:06 abdegenius

@abdegenius any update on this one?

glihm avatar Jul 17 '24 22:07 glihm

Hi, I'm at it, give me a little more time this week

El mié, 17 jul 2024 16:03, glihm @.***> escribió:

@abdegenius https://github.com/abdegenius any update on this one?

— Reply to this email directly, view it on GitHub https://github.com/dojoengine/dojo/issues/1936#issuecomment-2234410595, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSXFYXESNK4PV7CEAWJL3TZM3S3JAVCNFSM6AAAAABHJWU6H2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZUGQYTANJZGU . You are receiving this because you were mentioned.Message ID: @.***>

jancris100 avatar Jul 18 '24 00:07 jancris100

Starting with 1.0.0, models are only upgradeable by adding some fields, and the world double check this is true when upgrading.

Hence, modifying a key is not supported. Only values can be added, we can't modify an existing field or remove one.

glihm avatar Nov 11 '24 20:11 glihm