Search
ctrl/
Ask AI
Light
Dark
System

Administering an instance

Create a schema branch:

Copy
db> 
create schema branch my_new_feature from main;
OK: CREATE BRANCH

Create a data branch:

Copy
db> 
create data branch my_new_feature from main;
OK: CREATE BRANCH

Create an empty branch:

Copy
db> 
create empty branch my_new_feature;
OK: CREATE BRANCH

Create a role:

Copy
db> 
create superuser role project;
OK: CREATE ROLE

Configure passwordless access (such as to a local development database):

Copy
db> 
... 
... 
... 
... 
... 
... 
... 
configure instance insert Auth {
    # Human-oriented comment helps figuring out
    # what authentication methods have been setup
    # and makes it easier to identify them.
    comment := 'passwordless access',
    priority := 1,
    method := (insert Trust),
};
OK: CONFIGURE INSTANCE

Set a password for a role:

Copy
db> 
... 
alter role project
    set password := 'super-password';
OK: ALTER ROLE

Configure access that checks password (with a higher priority):

Copy
db> 
... 
... 
... 
... 
configure instance insert Auth {
    comment := 'password is required',
    priority := 0,
    method := (insert SCRAM),
};
OK: CONFIGURE INSTANCE

Remove a specific authentication method:

Copy
db> 
... 
configure instance reset Auth
filter .comment = 'password is required';
OK: CONFIGURE INSTANCE

Run a script from command line:

cat myscript.edgeql | edgedb [connection-option...]