title: EF migration for changing data type of columns
body: <p>I have a Model in my project as below:</p>
  
  <pre><code>public class Model 
  {
      public int Id { get; set; }
      public long FromNo { get; set; }
      public long ToNo { get; set; }
      public string Content { get; set; }
      public long TicketNo { get; set; }
  }
  </code></pre>
  
  <p>The migration is as below</p>
  
  <pre><code>public override void Down()
  {
      AlterColumn("dbo.Received", "FromNo", c =&gt; c.Long(nullable: false));
      AlterColumn("dbo.Received", "ToNo", c =&gt; c.Long(nullable: false));
      AlterColumn("dbo.Received", "TicketNo", c =&gt; c.Long(nullable: false));
  }
  public override void Up()
  {
      AlterColumn("dbo.Received", "FromNo", c =&gt; c.String());
      AlterColumn("dbo.Received", "ToNo", c =&gt; c.String());
      AlterColumn("dbo.Received", "TicketNo", c =&gt; c.String());
  }
  </code></pre>
  
  <p>when I use Update-Database the error below is raised:</p>
  
  <blockquote>
    <p>The object 'DF__Receiv__FromN__25869641' is dependent on column
    'FromNo'. ALTER TABLE ALTER COLUMN FromNo failed because one or more
    objects access this column.</p>
  </blockquote>
  
  <p>This tables has no foreign key or what else so what is the problem?</p>