Delete old MigrationStep classes?

Vote:
 

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?

#216252
Jan 30, 2020 18:28
Vote:
 

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.

#216253
Jan 30, 2020 19:01
Vote:
 

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

#216266
Jan 31, 2020 8:18
Vote:
 

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>
#216292
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.