| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Install
cargo install sea-orm-cliCreate (if none already created) a new blank postgres instance: docker run --name postgres -e POSTGRES_DB=glados POSTGRES_PASSWORD=password -d -p 5432:5432 postgres export DATABASE_URL=postgres://postgres:password@localhost:5432/glados
Generate all entities. Commands are made from the project root directory. ```command sea-orm-cli generate entity -o entity/src
Generate entity only for MyNewTable as defined in a migration (./migration/src/*.rs) file:
sea-orm-cli generate entity -o entity/src -t my_new_tableMake the tables/changes in the new database:
sea-orm-cli migrate upcargo run -- generate MIGRATION_NAMEcargo runcargo run -- upcargo run -- up -n 10cargo run -- downcargo run -- down -n 10cargo run -- freshcargo run -- refreshcargo run -- resetcargo run -- status| Back | FazBrowse Home | New Git URL |