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
Running edgedb migration create && edgedb migrate from this schema:
module default {
global current_user -> uuid;
type User {
access policy limit_to_current_user
allow all
using (global current_user ?= .id);
}
type LoginCode {
required property code -> str;
required link user -> User;
constraint exclusive on ((.user, .code));
access policy limit_to_current_user
allow all
using (global current_user ?= .user.id);
}
}
results in:
Created dbschema/migrations/00001.edgeql, id: m1uhrnii6aymztxa73vr5bnnrf7cjatxdcd5oouqpk72elj6p6i3wq
edgedb error: UnsupportedFeatureError: set returning functions are not supported in simple expressions
Remove the access policy from the User type:
module default {
global current_user -> uuid;
- type User {- access policy limit_to_current_user- allow all- using (global current_user ?= .id);- }+ type User {}
type LoginCode {
required property code -> str;
If we remove the unsuccessful migration with rm dbschema/migrations/00001.edgeql and then run edgedb migration create && edgedb migrate again, the result is:
Created dbschema/migrations/00001.edgeql, id: m1pebzmkoklhrqjubkqydozbxsivsdtkvz2o4arxpdeivm45pderba
Applied m1pebzmkoklhrqjubkqydozbxsivsdtkvz2o4arxpdeivm45pderba (00001.edgeql)
If we then add back the access policy to the User type:
module default {
global current_user -> uuid;
- type User {}+ type User {+ access policy limit_to_current_user+ allow all+ using (global current_user ?= .id);+ }
type LoginCode {
required property code -> str;
and run edgedb migration create && edgedb migrate again:
Created dbschema/migrations/00002.edgeql, id: m1z66inv2m6nxbebbt5lvv7zv7ksghemwkxpeemq6uqg7pvht72nnq
Applied m1z66inv2m6nxbebbt5lvv7zv7ksghemwkxpeemq6uqg7pvht72nnq (00002.edgeql)
The text was updated successfully, but these errors were encountered:
Steps to Reproduce:
edgedb migration create && edgedb migrate
from this schema:results in:
User
type:If we remove the unsuccessful migration with
rm dbschema/migrations/00001.edgeql
and then runedgedb migration create && edgedb migrate
again, the result is:User
type:and run
edgedb migration create && edgedb migrate
again:The text was updated successfully, but these errors were encountered: