After changing the key structure of a model, it's not possible to migrate
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.
Reproduce:
- Migrate a model
- Change the keys
- Try migrate again
@kariy
Can you assign this to me please? @ponderingdemocritus
This issue has someone already assigned ?
Hey, I will love to handle this issue. Can it be assigned to me?!
@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?
Can this be assigned to me so i can handle it? Thank you.. an any other issue you got please assign them to me
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.
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 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.
You are right, can't seem to figure it out! :) still checking tho
@abdegenius any update on this one?
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: @.***>
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.