68
Gracefully handle renaming of Content-types and fields in the CTB
candidate
p
paulovieira
If I rename a field in a content-type, and if there is some previous data there (in that field), all the data will be erased.
j
juan
Any update on this?
Daniel Szczukiewicz
Derrick Mehaffy Any news in this subject? It has been promised that this feature will be done in Q1.
Derrick Mehaffy
Daniel Szczukiewicz: I'm not sure where Q1 was mentioned but it is on our radar, I'm not sure of the exact timing as the PM who oversees this one is out today but I believe we are hoping for Q2 or maybe Q3 as it's a very big change and in the process I believe the plan is to completely refactor the content-type builder as a whole.
Daniel Szczukiewicz
Derrick Mehaffy: It was mentioned by one of yours Product Manager in my private call with him...
M
Marco Autiero ✅
Daniel Szczukiewicz: Hey Daniel 👋🏼
Yes, I confirm I shared with you that we planned to release this feature in Q1, but we had to postpone it to Q2. It was not a strategic decision, we just had to re-elaborate our ETAs (I remember already sharing my doubts regarding the ETA).
I know that it will have some impact on your team's choices, I'm sorry for that.
Daniel Szczukiewicz
Marco Autiero ✅: Hi Marco. Yeah, it's something we really need to. So till this feature will be deployed we will have to play with Data Transfer tool OR Import/Export plugin.
r
robbo.clancy null
Marco Autiero ✅: So Q1 2024 now? ...
G
Gegham Jivanyan
Marco Autiero ✅: so when should we wait for this
Derrick Mehaffy
candidate
Kevin Ren
New to the product and community. I think, so far overall Strapi is an really awesome tool, but it is still a growing project :)
From what I've read on the github issue page is that there is no short term fix for this; and as of Jan '23 the issue still persists.
It does sound like that you would need to create a migration file for your database to prepare before any schema changes in dev or prod. As this is mentioned:
and an example:
But really, if you are in dev mode, you shouldn't have that much critical data; and if you are in prod and did have critical data, then you can always write a migration script for your data migration so your database can reflect the schema change without the loss of data.
zippomode
not fixed at dec 2022
Arklogic
Problem persists also at components. For me it also would be good if I'd have to do it manually without UI, but somehow it's necessary to deal with this. You can't plan so well in a newly started projects these names.
R
Rainchai4240
Voted
S
Sam
Hi, Paulovieira,
In the discussion on GitHub, you said that for the short term we should “make a small change in the admin UI to disallow the possibility of renaming a field (that is, add the disabled attribute to the <input>, except when the field is being created).”
Where is that setting located in the Strapi UI? Is that under “Administration Panel” and “Roles”? Do you know if that setting is available on the Community Plan version of Strapi or just on the paid plans?
C
Chris
I agree with this comment -- the capability to rename should be disabled in dev since it's not really a rename -- it's a delete + create (and all the data is lost). https://github.com/strapi/strapi/issues/12626#issuecomment-1049696283
Daniel Szczukiewicz
Chris: Completely agree.