title: Remove index thru EntityFramework CodeFirst Migration
body: <p>We now use EntityFramework CodeFirst Migration.
  Our database table and index was created long time ago, before we use EntityFramework CodeFirst Migration. 
  Our table is myTable, with a column vchMyColumnA and index ColumnA.
  Since we used EntityFramework CodeFirst Migration, we have used EntityFramework CodeFirst Migration to add new columns to myTable.</p>
  
  <p>We need to drop Index ColumnA.</p>
  
  <ol>
  <li><p>Do we need to do it thru EntityFramework CodeFirst Migration, or can we just run a script to drop the index ?</p></li>
  <li><p>If we need to drop the index thru EntityFramework CodeFirst Migration, how can I do it ? In Package Manager Console, I typed add-migration DropColumnAIndex, and open the migration code DropColumnAIndex, and added this code:</p>
  
  <pre><code>public partial class DropColumnAIndex : DbMigration
  {
  
      public override void Up()
      {
          DropIndex("dbo.myTable", new[] { "ColumnA" });
      }
  
      public override void Down()
      {
          CreateIndex("dbo.myTable", "vchMyColumnA");
      }
  }
  </code></pre></li>
  </ol>
  
  <p>Then I typed update-database.
  There is no error, and I can see the migration in the database (select * from __MigrationHistor), but index ColumnA is still there.</p>
  
  <p>Thank you.</p>