Migration issue when cyclic dependency is altered
See original GitHub issue- EdgeDB Version: 1-beta.2
Steps to Reproduce:
- Apply the following schema:
module default {
type Article {
required property deleted := (EXISTS (.<element[IS default::DeletionRecord]));
};
type Category {
required property deleted := (EXISTS (.<element[IS default::DeletionRecord]));
};
type DeletionRecord {
required link element -> (default::Article | default::Category) {
on target delete delete source;
constraint std::exclusive;
};
};
};
- Change to:
module default {
abstract type Removable {
property deleted := EXISTS(.<element[IS DeletionRecord]);
}
type Article extending Removable {
};
type Category extending Removable {
};
type DeletionRecord {
required link element -> Removable {
on target delete delete source;
constraint std::exclusive;
};
};
};
- Get the following error on
create-migration
:
did you create object type 'default::Removable'? [y,n,l,c,b,s,q,?]
y
error: 'default::Removable.<element' does not resolve to any known path
┌─ query:2:41
│
2 │ CREATE PROPERTY deleted := (EXISTS (.<element[IS default::DeletionRecord]));
│ ^^^^^^^^^ error
Rolling back last operation...
did you create object type 'default::Removable'? [y,n,l,c,b,s,q,?]
On the other hand, schema from (2) works fine if applied from scratch
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Circular dependency error when running migrations in ...
The error message you get when you run the migrate command explains in detail the source of the conflicting model. – jcuot. Jul...
Read more >22932 ("makemigrations" generates circular dependencies)
The solution is to move the TeamCaptain model into a second migration in the team app, and make sure the migration dependencies are...
Read more >Circular dependencies detected when migrating from ...
When migrating to Rational® Application Developer (RAD) from WebSphere® Studio Application Developer (WSAD) it is possible that circular dependency errors ...
Read more >Error MSB4006: There is a circular dependency -- Creating ...
While trying to setup an EF Core project, the following error occurs when creating the migration. \foo\view\obj\view.csproj.
Read more >Handling circular dependency errors in AWS CloudFormation
When you get a circular dependency error, the first step is to examine the resources that are outlined and ensure that AWS CloudFormation...
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 FreeTop 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
Top GitHub Comments
We prohibit mixing non-computables with computables as well, not just different computables, but I agree that the error message needs clarification. I’d actually specialize the message to each prohibited combination (i.e. computable and non-computable and computable/computable).
\cc @vpetrovykh
Temporary, until the compiler learns to actually produce correct queries for polymorphic computables.