sqlx
Utility for SQLx, the Rust SQL toolkit. More information: https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/README.md.
- Create the database specified in the
$DATABASE_URLenvironment variable:
sqlx database create
- Drop the specified database:
sqlx database drop
- Create a new pair of up and down migration files with the given description in the "migrations" directory:
sqlx migrate add -r
- Run all pending migrations for the specified database:
sqlx migrate run
- Revert the latest migration for the specified database:
sqlx migrate revert
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
