-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
ISSUE: Exclude indexes is being overwritten by reverse engineering in the efpt.config.json file #2640
Comments
@chassq I am inestigateing this bug. Note that "exclude" has no effect in efpt.config.json. |
I implemented a fix for this in the latest daily build, would be grateful if you could try it out. |
I just pulled down version 2.6.653. Shut down VS 2022. Installed the new vsix file. I hand entered into the efpt.config.json file the following entry on the applicable table:
I then ran the reverse engineer and observed the entry was removed from the efpt.config.json file and the reverse engineer had not excluded the index. Did I perhaps do something wrong? |
You did nothing wrong, but you need build .655 or later. |
Hey Erik, So I did the same as above with version .655. The entries are now staying in the efpt.config.json when the reverse engineer runs but the indexes are not being ignored. They are still writing to the configuration files and the models are seeing the filtered unique indexes as a single object not a collection. I guess if the index was being ignored the configuration would not show it and the FK ref would be a collection in this case. |
Thanks for the feedback, I will have another look. |
@chassq Ah - are you using a .dacpac? |
yes we are using a dacpac. For example, we are pointing the reverse engineer directly at the SQL Project. It says (.dacpac) in the drop down selection |
Sorry, I missed that. The feature was never added to .dacpac reverse engineering |
Ah I see. Is it possible to do so? |
Oh yes, working on it! |
I did another attempt, pls try build. 656 or later |
Trying now |
Hey Erik, this looks good. Seems like it is working as expected. Thanks for this!!! |
Wonderful and thanks for the heads up |
We are trying to use the deature noted in #2520 and in the docs as
"You can also exclude indexes (SQL Server only), for example to work around this EF Core bug - add a list of ExcludedIndexes strings to your table object in efpt.config.json. CLI: excludedIndexes"
Provide steps to reproduce a bug
Add the ExcludedIndexes section to a table definition in the efpt.config.json. For example:
We run the reverse engineering, and the entry disappears from the efpt.config.json
Provide technical details
EF Core Power Tools version: 2.6.632
Exact Visual Studio version: Visual Studio 2022 Version 17.12.0 Preview 5.0
Database engine: Azure SQL
EF Core version in use: EF Core 8
Is Handlebars templates used: no
Is T4 templates used: no
Is a SQL Server .dacpac used: yes
The text was updated successfully, but these errors were encountered: