Pomelo.EntityFrameworkCore.MySql icon indicating copy to clipboard operation
Pomelo.EntityFrameworkCore.MySql copied to clipboard

Error assigning index for [table]

Open ITaluone opened this issue 1 year ago • 1 comments

Steps to reproduce

Setup

  • Library (.NET8.0): which should contain the context and such
  • A "build-project", which contains all dependencies like Microsoft.EntityFrameworkCore.Design and such (basically all which I don't want my db-lib should depend on)

Scaffold command dotnet ef dbcontext scaffold "CONNECTION_STRING" Pomelo.EntityFrameworkCore.MySql -o path\to\my\models\folder -f --startup-project path\to\my\build\project

The issue

Both project are building fine, but the scaffold afterwards is "throwing" the aforementioned error (only for one table).

I don't know if I could just ignore this? The models and context are building and seem to be correct.

Further technical details

MySQL version: 8.0.36 Operating system: ubuntu20.04 Pomelo.EntityFrameworkCore.MySql version: 8.0.2 Microsoft.AspNetCore.App version: net8.0

ITaluone avatar Apr 25 '24 09:04 ITaluone

I don't know if I could just ignore this? The models and context are building and seem to be correct.

We can't tell from the information you provided. Since this is about an index, some table index is probably not mentioned in your model, but is used in your database. Whether you can live without your app knowing about that index depends on your app.

@ITaluone If you want us to look into why this error is being generated, please post a SQL dump that we can use to setup a database that we can scaffold to reproduce the error message. Thanks!

lauxjpn avatar Apr 25 '24 14:04 lauxjpn