I created an entity and mapped to a view.
Now the migration script is applied correctly, everything works fine, but there this error after `Update-Database` and each time after run `Update-Database` the same error occurs:

(I don't want to disable AutomaticMigration)

> 
> Automatic migration was not applied because it would result in data
>  loss. Set AutomaticMigrationDataLossAllowed to 'true' on your
>  DbMigrationsConfiguration....
> 
> 
> 

The AutomaticMigration generates this:

```
IF object_id(N'[dbo].[FK_dbo.MyView_dbo.Table2_column1FromView]', N'F') IS NOT NULL
    ALTER TABLE [dbo].MyView DROP CONSTRAINT [FK_dbo.MyView_dbo.Table2_column1FromView]
    // (.. more similar lines...)
IF EXISTS (SELECT name FROM sys.indexes WHERE name = N'IX_column2FromView' AND object_id = object_id(N'[dbo].[MyView]', N'U'))
    DROP INDEX [IX_column2FromView] ON [dbo].[MyView]
    // (.. more similar lines...)

```

MyView:

```
public class MyView
{
    [Key]
    public int Id { get; set; }

    public int? Column1FromView { get; set; }

    public int? Column2FromView { get; set; }

    .....
}

```

And in the DbContext:

```
    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);
        ...

        modelBuilder.Entity<MyView>().ToTable("MyView");
    }

```

The Migration:

```
public partial class CreateMyView : DbMigration
{
    public override void Up()
    {
        Sql(@"CREATE VIEW [dbo].[MyView] 
              AS SELECT .... FROM   dbo.MyTable   
              GO ");
    }

    public override void Down()
    {
       Sql("DROP VIEW [dbo].[MyView];");
    }
}

```