Crates.io | sea-orm-cli |
lib.rs | sea-orm-cli |
version | 1.0.0-rc.7 |
source | src |
created_at | 2021-08-07 18:49:19.245542 |
updated_at | 2024-06-25 03:53:57.146752 |
description | Command line utility for SeaORM |
homepage | https://www.sea-ql.org/SeaORM |
repository | https://github.com/SeaQL/sea-orm |
max_upload_size | |
id | 432891 |
size | 117,487 |
Install and Usage:
> cargo install sea-orm-cli
> sea-orm-cli help
Or:
> cargo install --bin sea
> sea help
Getting Help:
cargo run -- -h
# MySQL (`--database-schema` option is ignored)
cargo run -- generate entity -u mysql://sea:sea@localhost/bakery -o out
# SQLite (`--database-schema` option is ignored)
cargo run -- generate entity -u sqlite://bakery.db -o out
# PostgreSQL
cargo run -- generate entity -u postgres://sea:sea@localhost/bakery -s public -o out
cargo run -- migrate init
cargo run -- migrate generate MIGRATION_NAME
cargo run -- migrate
cargo run -- migrate up
cargo run -- migrate up -n 10
cargo run -- migrate down
cargo run -- migrate down -n 10
cargo run -- migrate fresh
cargo run -- migrate refresh
cargo run -- migrate reset
cargo run -- migrate status