Problem with Expression index
See original GitHub issueI am triing to ensure that my context is synced with external schema. I am triing to scaffold context, but ef failed with error about expression index.
Expression index 'ux_bla_bla' on table private.awesome_table cannot be scaffolded, expression indices aren't supported and must be added via raw SQL in migrations.
System.NotImplementedException: The method or operation is not implemented.
I can’t drop that index because of ther reasons and i can’t skip it (or i don’t know how) Could you pls provide some flag or method to complete scaffold with warning about skipped objects or allow to skip em manually?
i am usin “dotnet ef dbcontext scaffold” command
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Multi-expression indexes in PostgreSQL not using being ...
1 Answer. It looks to me like there is a conflict between the single-expression and the multi-expression indexes. All applicable indexes are ...
Read more >Why does my expression index not accept the same syntax ...
But then when trying to create an expression index with it, there is a syntax error: # create index on mytable (start_date +...
Read more >Problem with Expression index · Issue #18382 · dotnet/efcore
I am triing to scaffold context, but ef failed with error about expression index. Expression index 'ux_bla_bla' on table private.awesome_table ...
Read more >Documentation: 15: 11.7. Indexes on Expressions
An index column need not be just a column of the underlying table, but can be a function or scalar expression computed from...
Read more >On the usefulness of expression indexes
The database is unable to use the index for multiple reasons. Indexes (at least btree indexes) rely on querying sorted data, provided by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
2.2. I guess if i use 3.0 version of provider would be 3.0+
@WhoStoleMyNick yeah, as the exception message says, the Npgsql EF Core provider doesn’t support expression indices in any way. This is tracked by https://github.com/npgsql/efcore.pg/issues/119 and hopefully will happen one day. But you can still set them up via raw SQL in your migrations, so this shouldn’t be blocking.