The tables and views of a store that merges, made and changed by code: the migrations in order, each one inside one transaction with the version it reaches written in the same transaction, so that a database is at a version or at the one before it and never between. A database of a newer version than the library knows is refused and left as it is, and so is a database of an earlier layout, which is not migrated. The version rows and the blobs are the mergeable tables (a key with ON CONFLICT IGNORE and no row id, so that replaying a dump of them is replaying a union); the facts of the copy, its trust, its epochs and its caches are local and never in a dump; the heads, the files, the siblings and the version vector are views of the rows. The index of search is made where the engine has one (the words of a text in an FTS5 table for SQLite) and the library says whether it did. The statements are written for SQLite and every driver of it; PostgreSQL and DuckDB are refused with a sentence until their layouts are made.
Brings the database to the latest version of the layout (or to target): each version in its own transaction, the version written with it. A database that is ahead of the library is refused, and so is one of an earlier layout. The index of search is made after the migrations, where the engine has one, and the fact is written.
type MigrateOptions = {
/** Whether to make the index of search: `auto` makes it where the engine has one, `require` f…(582 characters)
typeMigrateOptions= {
/** Whether to make the index of search: `auto` makes it where the engine has one, `require` fails where it cannot, `off` never makes it. */readonlysearch?:"auto"|"require"|"off";
/** The version to stop at: the latest where not given. */readonlytarget?:number;
/** Whether a migration that takes something away may run. */readonlydestructive?:boolean;
/** The plan of the migrations: the library's own where not given (a test gives its own to hold the refusal of a destructive step). */readonlyplan?:typeofMIGRATION_PLAN;
};