You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type C {
required property val -> str {
constraint exclusive;
}
}
type ROLinksA {
required link rol1 -> C {
readonly := True;
default := (SELECT C FILTER .val = 'D00');
}
}
Migration fails:
edgedb> start migration to { module default {} }; populate migration; DESCRIBE CURRENT MIGRATION; commit migration;
OK: START MIGRATION
OK: POPULATE MIGRATION
{
'ALTER TYPE default::C {
ALTER PROPERTY val {
DROP CONSTRAINT std::exclusive;
};
};
DROP TYPE default::ROLinksA;
DROP TYPE default::C;
DROP MODULE test;',
}
edgedb error: SchemaDefinitionError: cannot alter property 'val' of object type 'default::C' because this affects default expression of link 'rol1' of object type 'default::ROLinksA'
Detail: possibly more than one element returned by the default expression for link 'rol1' declared as 'single'
It would be nice if the populated migration could handle similar situations.
The text was updated successfully, but these errors were encountered:
…nality
This fixes problems where a constraint will be deleted before deleting
schema expressions that reference it and that need to be single.
Fixes#3275.
…nality (#3295)
This fixes problems where a constraint will be deleted before deleting
schema expressions that reference it and that need to be single.
Fixes#3275.
With schema:
Migration fails:
It would be nice if the populated migration could handle similar situations.
The text was updated successfully, but these errors were encountered: