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
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
ljspoor94
ljspoor94OP7mo ago
Interesting. Thanks! Would be good to get confirmation from the Gadget team 🙏🏼
Chocci_Milk
Chocci_Milk7mo ago
Dietlev is correct. The storage key is what points to your data
ljspoor94
ljspoor94OP7mo ago
Great! Time to do a big clean up. Thank you both.
Chocci_Milk
Chocci_Milk7mo ago
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)
ljspoor94
ljspoor94OP7mo ago
Okay cool, thanks.
ljspoor94
ljspoor94OP7mo ago
So just double-checking here, doing this is absolutely fine? As long as that storageKey remains the same, its all good?
No description
Chocci_Milk
Chocci_Milk7mo ago
Yes
ljspoor94
ljspoor94OP7mo ago
Great thanks for confirmation Antoine

Did you find this page helpful?