feat: support --fake for aerich upgrade (#398)
* feat: support `--fake` for aerich upgrade * Add `--fake` to downgrade * tests: check --fake result for aerich upgrade and downgrade * Update readme * Fix unittest failed because of `db_field_types` changed * refactor: improve type hints and document
This commit is contained in:
17
README.md
17
README.md
@@ -278,6 +278,23 @@ await command.init()
|
||||
await command.migrate('test')
|
||||
```
|
||||
|
||||
## Upgrade/Downgrade with `--fake` option
|
||||
|
||||
Marks the migrations up to the latest one(or back to the target one) as applied, but without actually running the SQL to change your database schema.
|
||||
|
||||
- Upgrade
|
||||
|
||||
```bash
|
||||
aerich upgrade --fake
|
||||
aerich --app models upgrade --fake
|
||||
```
|
||||
- Downgrade
|
||||
|
||||
```bash
|
||||
aerich downgrade --fake -v 2
|
||||
aerich --app models downgrade --fake -v 2
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the
|
||||
|
||||
Reference in New Issue
Block a user