Skip to content

Incorrect foreign keys in database #802

@JBakker01

Description

@JBakker01

Description

In several instances, the on-delete action of the foreign keys in the database does not match the action specified in the dbcontext. This seems to be the case for keys that were initially created with a different action than their current state. It appears that there is no migration that correctly changes these key constraints.

Example

For example, the reference from ImageEntity to ItemEntity.

In one of the early migrations, this was modeled as RESTRICT:
Image

Currently, this is modeled as CASCADE:
Image

However, the actual database state is still NO_ACTION (= RESTRICT):
Image

Context

Platform: 3.887.0
Catalog Module: 3.863.0
Database: SQL Server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions