-
Notifications
You must be signed in to change notification settings - Fork 568
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
[BUG] Cannot create foreign keys referencing tables in non-default schema #4722
Comments
I've fixed this on my local system so that I can continue to work, but I'm unable to push my changes and create a PR. |
@Hypnodude when you say "EFCore allows for the specification of a ForeignKey in a non-default schema using the PrincalSchema property" I am guessing that you are referring to SQL Server only? Oqtane supports multiple databases - MySQL, PostgreSQL, SQLite - and some of them do not support schemas. |
Hi @sbwalker, |
fix #4722 - support PrincipalSchema when creating foreign keys (credit @Hypnodude)
Thanx @sbwalker - much appreciated |
Oqtane Info
Version - 5.2.3
Render Mode - Any
Interactivity - Any
Database - SQL Server
Describe the bug
The Oqtane.Migrations.ForeignKey struct does not contain a property for the PrincalSchema, so it is only capable of handling foreign keys in the default schema.
Expected Behavior
EFCore allows for the specification of a ForeignKey in a non-default schema using the PrincalSchema property, but this is not captured in Oqtane and passed to EFCore.
Oqtane should expose the PrincialSchema property on the ForeignKey structure to allow it to be captured and passed to the underlying EFCore module.
Steps To Reproduce
Create a couple of tables in a different (non-default) schema (eg. fees). and try create a foreign key reference from 1 table to another.
LookupTable:
Data Table referencing the lookup table:
Anything else?
The text was updated successfully, but these errors were encountered: