Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error assigning index for [table] #1911

Open
ITaluone opened this issue Apr 25, 2024 · 1 comment
Open

Error assigning index for [table] #1911

ITaluone opened this issue Apr 25, 2024 · 1 comment

Comments

@ITaluone
Copy link

ITaluone commented Apr 25, 2024

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

@lauxjpn lauxjpn self-assigned this Apr 25, 2024
@lauxjpn
Copy link
Collaborator

lauxjpn commented Apr 25, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants