substrate-archive
substrate-archive copied to clipboard
Missing postgres user
Out put when running TEST_DATABASE_URL="postgres://localhost:5432/archive" cargo test:
error: error returned from database: role "postgres" does not exist
--> /Users/aggron/dev/work/substrate-archive/substrate-archive/src/database/queries.rs:65:5
|
65 | Ok(sqlx::query_as!(
| ________^
66 | | Series,
67 | | "
68 | | SELECT missing_num
... |
76 | | max_block_load
77 | | )
| |_____^
|
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` (in Nightly builds, run with -Z macro-backtrace for more info)
I guess this means I need a postgres user?
Running createuser -s postgres fixes this (on macos not all postgres installations come with a "standard" setup script). Worth adding to the docs.