Closed Viroide closed 8 years ago
There isn't a seamless way to migrate data built into the library. You'll need to build a migration yourself. e.g. Maybe something like add a column called lastNameEncrypted
, which is mapped to the encrypted field. Then write some code that will populate the encrypted property from the unencrypted property's value and save the entity.
There was so much fields that what I did was to make a "temporal" table were I clone de real table. Ones this was done I truncate original table and make the fields as encrypt type fields. Then I populate the original with the temp one. And now all is working just fine!
Thanks for all, your plugin is great. (You can close the issue)
great - good to hear.
I have some fields in my DB populated, for example lastName, that I want to handle with this plugin, but if I add lastName type: GormEncryptedStringType I have this error:
I supposed that is because this field is not null, and is not yet encrypted. So my question is, how can I encrypt this fields with the same config as the plugin but without using it?