Skip to main content

D1Migrator<TContext>.Migrate<TEntry,TValue> method

Migrate data from an unencrypted column to an encrypted column.

public void Migrate<TEntry, TValue>(Func<TContext, IQueryable<TEntry>> where, 
Func<TEntry, TValue> oldPropertyGetter, Action<TEntry, TValue> newPropertySetter,
int batchSize = 100)
parameterdescription
TEntryThe type of entry to migrate.
TValueThe type of value to migrate.
whereFilter to locate rows that should be migrated.
oldPropertyGetterFunc used to get the unecrypted value.
newPropertySetterAction used to set the encrypted value.
batchSizeThe number of rows to process at a time.

See Also