Skip to main content

make_empty

Function make_empty 

Source
pub async fn make_empty(plugin: &str) -> Result<PathBuf, MigrateError>
Expand description

Write an empty migration for one plugin: the current snapshot with an empty operations list, the authoring stub for a hand-written data migration (Operation::RunSql). The developer opens the file and adds a RunSql { sql, reverse_sql } op.

The empty op-list means snapshot_after == snapshot_before, so the next make diffs against the same state and produces nothing — a data migration never disturbs the schema-snapshot chain. Mirror of make for the --empty <plugin> CLI path.