Renaming custom models/fields
If I have an app already deployed to production, installed on stores and contains data, is it possible with Gadget to rename these (in dev and deploy obviously), will it break anything? I obviously will need to update my code to read from the new model, e.g.
api.name1
-> api.name2
. But in terms of the already stored data, will this break?
I suppose the same goes for the fields on a model, can they also be renamed and data not affected?9 Replies
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
Interesting. Thanks! Would be good to get confirmation from the Gadget team 🙏🏼
Dietlev is correct. The storage key is what points to your data
Great! Time to do a big clean up. Thank you both.
Note that you can have the same storage key on multiple apps and that this doesn't open your data to any sort of vulnerability
If you accidentally remove a model or field you can bring it back (and the data) with source control (git)
Okay cool, thanks.
So just double-checking here, doing this is absolutely fine? As long as that storageKey remains the same, its all good?

Yes
Great thanks for confirmation Antoine