This seems to be something obvious but I simply can't find info by googling. How can I rename a field in Doctrine2 without losing data (i.e. dropping old field and creating new one)?
Thanks!
Manually run an SQL query against your DB to rename the field.
Although the Doctrine 2 schema-tool exists, it is not meant to be used for modifying production databases and as such does not necessarily perform operations in a way which does not lose data (plus it would be kind of tricky to detect something like a column rename 100% accurately just based on the metadata for the entities)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With