title: How to Enable Migration to update my database in MVC4?
body: <p>I'm working on a project using MVC4 in Visual Studio 2012 and have added a column in the table.</p>
  
  <p>Now when I want to debug my project the error says to use the migration to update my database.</p>
  
  <p>What I have to do?</p>
  
  <p>I have been searching a lot and found some methods like:</p>
  
  <pre><code>protected override void OnModelCreating(DbModelBuilder modelBuilder)
  {
    Database.SetInitializer&lt;ResTabelaIndex&gt;(null);
  }
  </code></pre>
  
  <p>but don't know how and where to implement this... Have tried in <code>app_start</code>, <code>global.asax</code> etc...</p>
  
  <p>What I found was, to enable the migrations directly in the console from the nuget.</p>
  
  <p>But I can't make this work.</p>
  
  <p><strong>Commands I use:</strong></p>
  
  <pre><code>Enable-Migrations -EnableAutomaticMigrations
  </code></pre>
  
  <p>==> Console says that more than one context was found .
         To enable use, <code>Enable-Migrations -ContextTypeName  NameOfTheNamespace.Models.DefaultConnection</code></p>
  
  <p>But I don't know what is the <code>-ContextTypeName</code>, have tried a lot but couldn't understand.</p>
  
  <pre><code>My Model Code:
  
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Data.Entity;
  using System.Data.Entity.ModelConfiguration.Conventions;
  using System.Data.Entity.Migrations;
  using System.ComponentModel.DataAnnotations;
  using System.Data.Entity.Infrastructure;
  
  namespace Vista.Models
  {
      public class TabelaIndex
      {
          public int ID { get; set; }
          public string n_empresa { get; set; }
          public string titulo{ get; set; }
          public string url { get; set; }
          public string imagens { get; set; }
      }
  
      public class DefaultConnection : DbContext
      {
          public DbSet&lt;TabelaIndex&gt; ResTabelaIndex { get; set; }
      }
  
  }
  </code></pre>