chore: add "pnpm run migrations:revert" command (#23869)

This commit is contained in:
idubnori authored and GitHub committed 2025-11-13 10:12:59 -06:00
1 parent 4a6c50cd81
commit 2cefbf8ca3
5 files changed
+116 -13

No files matched your search

@@ -12,3 +12,13 @@ pnpm run migrations:generate <migration-name>
3. Move the migration file to folder `./server/src/schema/migrations` in your code editor.
The server will automatically detect `*.ts` file changes and restart. Part of the server start-up process includes running any new migrations, so it will be applied immediately.
## Reverting a Migration
If you need to undo the most recently applied migration—for example, when developing or testing on schema changes—run:
```bash
pnpm run migrations:revert
```
This command rolls back the latest migration and brings the database schema back to its previous state.