Search documentation

Find a page in the Andurel docs.

Database Commands

Andurel wraps PostgreSQL lifecycle, embedded Goose migrations, and named seed operations.

Database lifecycle

1andurel database create
2andurel database drop
3andurel database nuke
4andurel database rebuild
5andurel database rebuild --skip-seed

rebuild drops and recreates the configured database, applies migrations, and runs a seed. Destructive commands prompt by default; --force permits protected system-database names and should be reserved for explicit automation.

Migrations

1andurel database migrate new add_status_to_products
2andurel database migrate up
3andurel database migrate down
4andurel database migrate status
5andurel database migrate reset
6andurel database migrate up-to 12
7andurel database migrate down-to 8
8andurel database migrate fix

Migrations are SQL files in root migrations/ and are embedded by the migrations package.

Named seeds

1andurel database seed
2andurel database seed development
3andurel database seed --list
4andurel database rebuild --seed test

Root seeds/ owns the registry and composes model factories. Keep test, development, and production-safe seed intent separate.

Inspect the database

1andurel console
2andurel tool dblab

Both use the current project connection settings. console opens usql; dblab opens the terminal database UI.