Eastrall / EntityFrameworkCore.DataEncryption

A plugin for Microsoft.EntityFrameworkCore to add support of encrypted fields using built-in or custom encryption providers.
MIT License
326 stars 54 forks source link

[Question] Migrating existing data #7

Closed jbarczyk closed 3 years ago

jbarczyk commented 4 years ago

Is there a good way to migrate existing data using this extension? Usecase: Database with data already existing and the data needs to be encrypted

Eastrall commented 4 years ago

Hi,

Unfortunately, the library doesn't support this use case. We can add this feature to the library's roadmap thought.

jbarczyk commented 4 years ago

Would be great, thanks!

mguinness commented 3 years ago

If you're using MySQL you can use the AES_ENCRYPT() function to encrypt existing data.

Eastrall commented 3 years ago

PR #25 has introduced a migration provider: https://github.com/Eastrall/EntityFrameworkCore.DataEncryption/releases/tag/v3.0.0