Reputation: 4534
When I generate a migration, it fails to reckon that I don't have a certain table (Reports) in the DB, so the generated migration is empty. Nonetheless, I have all the code in place for the generation to run smoothly.
This code is old and was left unfinished until today. Moreover, I can't find any migration referring to the aforementioned table, but for some reason, it thinks the table already exists in the DB. For example, if I change the table name in the Mapping class, like shown below, it will generate a migration with a RenameTable command. And of course, the update-database command will fail.
this.ToTable("Report");
Any idea on how I can solve this?
Upvotes: 0
Views: 1384
Reputation: 4534
As pointed out in the comments, the problem was fixed by using the following hack:
Upvotes: 2