这是indexloc提供的服务,不要输入任何密码
Skip to content

Error on changing foreign key to Delete Cascade (probably due to case bug) #2030

@fvieira

Description

@fvieira

When trying to change a foreign key to Delete Cascade, I got the following error:

{
    "path": "$.args[0].args",
    "error": "query execution failed",
    "internal": {
        "arguments": [],
        "error": {
            "status_code": "42704",
            "exec_status": "FatalError",
            "message": "constraint \"tourday_tourid_fkey\" of relation \"tourDay\" does not exist",
            "description": "",
            "hint": ""
        },
        "prepared": false,
        "statement": "alter table \"public\".\"tourDay\" drop constraint tourDay_tourId_fkey;"
    },
    "code": "postgres-error"
}

My guess is that the SQL statement is missing quotes around the constraint name, which means it is evaluating it in lower case, and so it can't find the constraint.

Metadata

Metadata

Assignees

Labels

c/consoleRelated to consolek/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions