Recommended steps to take when your setup isn't working.
Ensure you can connect to it with psql
and the table exist.
If this fails, you need to work on correctly installing PostgreSQL,
importing the initial schema, as well as running the migrations.
Check the connection with the following command:
bin/rails console
Also make surre that Rails can connect to the database:
Post.count
If this fails, you need to make sure your
Danbooru configuration files are correct.
Ensure it is working correctly, for this you
may need to debug it's configuration files.
Look through all log files.