FluentMigration Backup Table
<p>I have a Table which needs removal of a few columns.</p>

<pre><code>TableA 
{
  ID int, 
  Name NVarChar(MAX) NOT NULL, 
  ToDelete1 int NOT NULL,
  ToDelete2 int NOT NULL,
}
</code></pre>

<p>I'm using FluentMigrator .NET (ActiveRecord Ruby On Rails like Migration). For the UP() migration it's a simple case of dropping the columns.</p>

<p><strong>How do I create the down part of the migration?</strong> </p>

<p>My idea is to create a clone of the table during the UP() process and then copy the schema and data back to the Original during the Down() process.</p>

<p>What is the easiest way to achieve this?</p>

<p><strong>EDIT:</strong> TableA.ID is referenced by other tables. So if we are deleting all rows from TableA and reinserting from TableA_Backup it has to be done while all foreign key constraints are turned off and with identity_insert turned on as far as I understand.</p>

<p>A code example would be great.</p>