Expand description
Schema migrations: SurrealQL files applied in order.
Each migration is a .surql file in DIR, named
<YYYYMMDD_HHMMSS>_<name>.surql so that names sort in the order they
were written. A migration runs in one transaction together with its
record in the TABLE table, so it is applied completely or not at
all, and never twice. Migrations must not contain BEGIN/COMMIT.
Migrations only move forward: to undo one, write another.
Structs§
- Migration
- A migration file.
Constants§
Functions§
- applied
- The names of the applied migrations, in order.
- apply
- Applies the pending migrations in
dir, in order, and returns their names. - load
- Every
.surqlfile indir, in name order. - reset
- Removes every table (with its data), sequence, function, param and analyzer from the database, including the record of applied migrations.
- run_cli
- The command line of an app’s
migratebinary: - status
- Each migration in
dirand whether it has been applied.