docs: Explain sqlx usage Both how migrations are ran, as well as how to create migrations is now described in the readme. This should help contributors going when introducing a new model.
Dependencies
- [2]
BAWJ3BJ5nix: Do not start PG if running In a nix hook the PG server is started when `nix-shell` is invoked. This created extra output when nix-shell was invoked on an extra shell as it tried to start a new PG server again while it was already running. This change updates the behaviour to not do this, and verify with pg_ctl if PG is already running. - [*]
K4JNAJOFdatabase: Connect to postgres on Rocket boot As database I've chosen PostgreSQL, as my personal experience has been good with it. This change allows Rocket to connect to the database on booting the server. It depends on the DATABASE_URL being set, and for now circumvents the Rocket config helpers as it seemed faster to be up and running this way.
Change contents
- edit in README.md at line 19
##### Database migrationsThis project uses `sqlx` to integrate with the database. Migrations are run whenRocket lifts off (boots its runtime).Generating a new migrations is done by running: `sqlx migrate add -r <description>`.Note both an up and down migration are required.