edgedb migration
EdgeDB provides schema migration tools as server-side tools. This means that, from the point of view of the application, migrations are language- and platform-agnostic and don’t require additional libraries.
Using the migration tools is the recommended way to make schema changes.
Setup
First of all, the migration tools need a place to store the schema and
migration information. By default they will look in the dbschema
directory, but it’s also possible to specify any other location by
using the schema-dir option.
Inside this directory, you will find an .esdl
file with an SDL schema description. You may split your schema across multiple
.esdl
files. The migration tools will read all of them and treat them as a
single SDL document.
Bring current branch (or database pre-v5) to the latest or a specified revision | |
Create a migration script | |
Edit migration file | |
Extract migration history and write it to /migrations. | |
Show all migration versions | |
Show current migration state | |
Checks your schema against a different EdgeDB version. |