Compilation trouble with ocsigen-start.6.1.0 (db not created or not accessible?) SOLVED

debian 11
psql (PostgreSQL) 13.9 (Debian 13.9-0+deb11u1)
ocaml 4.14.0 (or 4.10.0)
ocsigen-start.6.1.0

Surprisingly, while this step is always smooth, a simple compilation fails (ocaml 4.14.0 or 4.10.0 and ocsigen-start.6.1.0):

$ eliom-distillery -name foo -template os.pgocaml
$ cd foo/
$ make db-init    # starts psql server
$ make test.byte  # fails when connecting to db 
...
eliomc -w +A-4-7-9-37-38-39-41-42-44-45-48-70 -c -ppx -package lwt_ppx -package js_of_ocaml-ppx_deriving_js
on -package ppx_deriving.std -package pgocaml -package ocsigen-ppx-rpc -package pgocaml -package pgocaml_pp
x -package ocsigen-start.server -g demo_pgocaml_db.ml                                                      
FATAL: 3D000: database "foo" does not exist                                                             
File "demo_pgocaml_db.ml", line 13, characters 6-61:                                                       
13 |       [%pgsql dbh "SELECT lastname FROM ocsigen_start.users"])                                        
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                         
Error: PG'OCaml PPX error: Could not make the connection host=localhost,                                   
       port=3000, user=lm, password=*****, database=foo, error:                                         
       PGOCaml_generic.Make(Thread).PostgreSQL_Error("FATAL: 3D000: database                               
       \"foo\" does not exist", _)                                                                      
make: *** [Makefile.os:235: _server/demo_pgocaml_db.cmo] Error 2
# Checking db
$ sudo -u postgres psql  # there are no other users, as usual (I think)
psql (13.9 (Debian 13.9-0+deb11u1), server 11.17 (Debian 11.17-0+deb10u1))
Type "help" for help.

postgres=# \l
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   
-----------+----------+----------+-------------+-------------+-----------------------
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
(3 rows)

It seems that DB “foo” was not created by the Make file. Or there is a permissions trouble because there is a running db server…

$ make db-status                                                           
[WARNING] var was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.                                                                                         
[WARNING] var was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.                                                                                         
/usr/lib/postgresql/13/bin/pg_ctl -D local_db -l local_db/log status                                       
pg_ctl: server is running (PID: 29691)                                                                     
/usr/lib/postgresql/13/bin/postgres "-D" "local_db" "-p" "3000"

Do you have some hint to solve that?
Thanks

PS: btw, is there something related to opam to clean up (WARNING)?

$ make db-stop                                                             
[WARNING] var was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.                                                                                         
[WARNING] var was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.                                                                                         
/usr/lib/postgresql/13/bin/pg_ctl -D local_db -l local_db/log stop                                         
waiting for server to shut down.... done                                                                   
server stopped

Hummm…
oscigen-start works PERFECTLY.

And it’s a local DB for test (in local_db/) and not a system wide DB.

After db-init, I “just” forgotten db-create and db-schema…
On my usual machine, I have a script that does the sequence for me.
This happens when you drink too much champagne and want to do some programming at the same time!

$ eliom-distillery -name foo -template os.pgocaml  # create webapp scaffold ("distillery")
$ make db-init     # starts psql server
$ make db-create   # create DB       <<<===
$ make db-schema   # create schema   <<<===
$ make test.byte 

See ocsigen-start/README.md at master · ocsigen/ocsigen-start · GitHub