1.0 Beta 2
This changelog summarizes new features and breaking changes in EdgeDB 1.0 beta 2 “Luyten”.
Migrations
We’ve been working a lot on our migrations tools with the goal of improving the developer experience. Here’s a highlight of recent changes and fixes:
-
Fix
sequence
default values getting lost after some migrations (#2389). -
Fix moving indexes around the type hierarchy (#2380).
-
Fix issues with renaming (#2353).
-
Fix an issue using a symbol defined in a
with
block in SDL (#2320). -
Fix multiple issues with migrations to an empty schema (#2296).
-
Make it possible to add new values to
enums
in migrations (#2328). -
Fix SDL handling of types with two or more indexes (#2301).
-
Fix a regression with array aliasing that made array aliases indistinguishable (#2287).
-
Fix a number of issues with constraints and provide better context information for constraint definition errors (#1370, #2250, #2305, #2307, #2311, #2410).
-
Fix
drop owned
on links and properties with defaults (#2306). -
Fix
set type
on links and properties with constraints (#2309).
EdgeQL
-
Make sure sequence state gets included in dumps (#2441).
-
Implement functions to explicitly advance or reset a sequence value (#2508).
sequence_next()
returns the next value for the specified sequence type.sequence_reset()
resets the current value of the specified sequence, the next call tosequence_next
will return the next value in sequence. -
Drop the deprecated
Port
. The more general extension mechanism introduced in EdgeDB 1.0 beta 1 should be used (#2262). -
Reduce the maximum length for names of databases and roles to 51 characters (#2465).
-
Enable
br
(orrb
) as a valid bytes literal prefix (#2332). -
Enable
describe schema as sdl
(#2481). -
Support
unless conflict on
with two or more properties or links (#1939).This clause allows performing an alternative query when a conflict due to a constraint occurs during an
insert
:Copyinsert Person { name := "Alice" } unless conflict on .name # If a Person with this name exists, else (select Person) # select that existing Person instead.
-
Make
min()
andmax()
work more consistently across all supported types (#1920). -
Improve cardinality inference (#2097).
-
Disallow use of
Volatile
functions in schema-defined computed expressions (#2467). -
Fix handling of collection types of non-builtin scalars in dumps (#2349).
-
Fix an issue with empty sets (i.e.
{}
) inside set literals (#2154). -
Fix backlinks when multiple types with the same link name exist (#2360).
-
Fix some serialization issues of shapes inside arrays and tuples (#1818).
-
Make sure
delete
also applies to all sub-types of the selected type (#2265).
GraphQL
Command-Line Tools
We’ve added edgedb project init
command to help manage EdgeDB
credentials for your project. Running this in a new project directory
will setup an EdgeDB instance, create a schema and migrations
directory and link the credentials for that instance to the project
directory.
$
edgedb project init
No `edgedb.toml` found in `/home/username/dev/hw` or above Do you want to initialize a new project? [Y/n] > Y Specify the name of EdgeDB instance to use with this project [default: myproject]: > myproject Type a number to select an option: How would you like to run EdgeDB for this project? 1. Local (docker) > 1 Checking EdgeDB versions... Specify the version of EdgeDB to use with this project [default: 1-beta2]: > 1-beta2 ┌─────────────────────┬──────────────────────────────────────────┐ │ Project directory │ /home/username/dev/myproject │ │ Project config │ /home/username/dev/myproject/edgedb.toml │ │ Schema dir (empty) │ /home/username/dev/myproject/dbschema │ │ Installation method │ Docker Container │ │ Version │ 1-beta2-c23b7a1 │ │ Instance name │ myproject │ └─────────────────────┴──────────────────────────────────────────┘ Initializing EdgeDB instance... e740091d317687d1628f96e43a77ec02f098de68df3b8b95b3bd987f7c30080d Applying migrations... Everything is up to date. Revision initial Project initialialized. To connect to myproject, just run `edgedb`
As the last line indicates it is no longer necessary to supply the
instance name explicitly to connect to the project instance, just
edgedb
will do the trick. This is also true for using any of
EdgeDB’s client libraries, the instance name is no longer required.
Existing projects can be converted to use this feature by simply
running edgedb project init
in the existing project’s directory:
$
edgedb project init
No `edgedb.toml` found in `/home/username/dev/myproject` or above Do you want to initialize a new project? [Y/n] > Y Specify the name of EdgeDB instance to use with this project [default: myproject_uuyg1cr]: > myproject Do you want to use existing instance "myproject" for the project? [y/n] > y Applying migrations... Everything is up to date. Revision m1lsdptp5qk4sway5vc6ttknwignhm34xncyxwrus2fygnj6nuo7ra Project initialialized. To connect to myproject, just run `edgedb`
Bindings
-
Update the edgedb-python driver to v0.14.0.
-
Update the edgedb-js driver to v0.14.0.
-
Release Deno driver.
-
Implement
with_transaction_options
andwith_retry_options
from RFC 1004 for edgedb-python and edgedb-js.These methods on the connection object allow obtaining a new connection with modified options.