geldata / geldata/gel

InternalServerError on link to multi link migration with exclusive contraint

Open
#5,331 0 comments 1 reaction 0 assignees View on GitHub
migrations
Dominant language
Python
Stars
14.2k
Forks
450
PR merge metrics
No merged PRs in 30d

Description

When trying to migrate a link with an exclusive constraint to a multi link with an exclusive constraint, it gives an `InternalServerError`.

- EdgeDB Version: 2.13+f1841db
- EdgeDB CLI Version: 2.3.1+ef99779
- OS Version: Windows 10

Steps to Reproduce:

1. Create a project with `edgedb project init`
2. Add and migrate to schema with an `exclusive link`
3. Migrate the `exclusive link` to an `exclusive multi link`

Schema:

from
```
module default {
type Foo {
required link bars -> Bar {
constraint exclusive;
}
}

type Bar {
required property name -> str;
}
};
```

to
```
module default {
type Foo {
required multi link bars -> Bar {
constraint exclusive;
}
}

type Bar {
required property name -> str;
}
};
```

---

Error:

```
edgedb error: InternalServerError: cannot drop column 22bbc97a-d912-11ed-85bf-23ad3a6d9c09 of table edgedbpub."22bab21a-d912-11ed-8e50-156c6acabc86" because other objects depend on it
Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket at https://github.com/edgedb/edgedb/issues/new?template=bug_report.md
Server traceback:
edb.errors.InternalServerError: cannot drop column 22bbc97a-d912-11ed-85bf-23ad3a6d9c09 of table edgedbpub."22bab21a-d912-11ed-8e50-156c6acabc86" because other objects depend on it
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the migration with `edgedb project init`: migrate the first schema with an exclusive link, then change it to an exclusive multi link and migrate again. Use the reported dependency error as the failure condition; done means the schema change completes without an InternalServerError.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.