substrate-archive icon indicating copy to clipboard operation
substrate-archive copied to clipboard

Missing postgres user

Open dvdplm opened this issue 4 years ago • 1 comments

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?

dvdplm avatar Nov 09 '21 14:11 dvdplm

Running createuser -s postgres fixes this (on macos not all postgres installations come with a "standard" setup script). Worth adding to the docs.

dvdplm avatar Nov 09 '21 14:11 dvdplm