Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Delete old MigrationStep classes?


After you deploy a custom MigrationStep (say, after renaming a property), should the MigrationStep class remain in the code base or is it safe to delete?

Jan 30, 2020 18:28

It is safe to delete.

Personally I tend to just comment it out, to have it easy accessible the next time I need to do the same thing.

Jan 30, 2020 19:01

Sure. After a migration step has run on all your environments, it is safe to delete it from code.

Jan 31, 2020 8:18

Comment from source code of EPiServer.DataAbstraction.Migration.MigrationStep:

  /// <remarks>
  ///   <para>
  ///               There is no versioning handling in a migration step. It is intended to be a very specific class for specific databases.
  ///               It is safe to remove the migration step implementation after the changes described in it have been commited to the database.
  ///           </para>
  /// </remarks>
Feb 02, 2020 19:52
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.