Write TypeORM database code with migrations.
Recent revisions are kept. Restoring one creates a new revision.