command
ridu migrate baseline
Record migrations a ridu dev database already has as applied, without running them.
Example
ridu migrate baseline --replace \
--previous-history .ridu/previous-migrationsHow it works
After squashing schema history before deployment, --replace atomically adopts the committed history on PostgreSQL, SQLite, or MongoDB without changing content. The database must already have its schema, and the schema record that ridu dev or a migration wrote must match it. Supply --previous-history with the original recorded artifacts when they differ from the committed files.
Replacement refuses partial migrations, discarded data or semantic steps, and dropped collections or globals; a new data step stays pending for ridu migrate up. When the database is exactly at its recorded head, binaries built from the old history may be serving it, so the command asks before replacing; stop every application process and writer first, or pass --allow-production without a terminal.
Full signature
ridu migrate baseline
[--database-url <url> | --database-path <path>]
[--allow-insecure-database (PostgreSQL or MongoDB)]
[--replace [--previous-history <directory>] [--allow-production]]