MIGRATE_BACKUP_DECLINED
`nextly migrate` found the migration records of an earlier Nextly release, and its backup question was answered no.
Cause
nextly migrate found the migration records of an earlier Nextly release, and its backup question was answered no.
Earlier releases recorded migrations in nextly_migrations and nextly_migration_journal. nextly migrate moves those records into nextly_schema_events and drops both tables, so it asks whether the database is backed up first. At the prompt the answer was no, so nothing was changed.
Fix
- Back up the database.
- Run
nextly migrateagain and answer yes, or pass--backup-confirmed.
Example
✗ The migration records of an earlier Nextly release were not moved: the backup question was answered no.
Why: `nextly migrate` moves those records into `nextly_schema_events` and drops the tables that held them, so it asks for a backup first, and the answer was no. Nothing was changed.
Next: Back up the database, then run `nextly migrate` again and answer yes, or pass `--backup-confirmed`.
Docs: https://nextlyhq.com/docs/cli/errors/migrate-backup-declined (MIGRATE_BACKUP_DECLINED)MIGRATION_NOT_WRITTEN
A migration file could not be moved into place once others of the same migration were there, so the command removed the files it had placed and wrote no migration.
MIGRATE_BACKUP_NOT_CONFIRMED
`nextly migrate` found the migration records of an earlier Nextly release, and no backup was confirmed, with no terminal attached to ask.