Light
Dark
System
v4latest
v5dev
v4latest
v3
v2
v1

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.

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.

edgedb migration apply

Bring current database to the latest or a specified revision

edgedb migration create

Create a migration script

edgedb migration edit

Edit migration file

edgedb migration log

Show all migration versions

edgedb migration status

Show current migration state

edgedb migration upgrade-check

Checks your schema against a different EdgeDB version.

Light
Dark
System

We use ChatGPT with additional context from our documentation to answer your questions. Not all answers will be accurate. Please join our Discord if you need more help.