Column names in each table must be unique. Column name 'StripeRecipientId' in table 'dbo.Foos' is specified more than once

code-first entity-framework entity-framework-6

Question

I have a model class namedFoo that includes these qualities among others.

public string StripeRecipientId { get; set; }

public override bool HasProvidedBillingInformation
{
    get
    {
        // return !string.IsNullOrEmpty(this.StripeRecipientId);

        return false;
    }
}

I'm using Code First and have enabled migrations. If I use theupdate-database using a commandlet, whether-Force option is supplied or not, I receive the following error:

Column names in each table must be unique. Column name 'StripeRecipientId' in table 'dbo.Foos' is specified more than once.

I made sure to verify both the table and my model more than once, and both have only one column with that name. A previous iteration of the created this column.update-database commandlet only recently.

Although I am tempted to destroy my database and then implement the migrations, doing so would need me to generate a significant amount of test data in order to test the current feature I am working on.

Entity Framework v6.1.2 is what I'm using.

How can I fix this error?

1
11
9/29/2015 1:31:15 PM

Accepted Answer

ZZZ_tmp
20
12/23/2016 8:38:00 AM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow