Comments (8)
The following error is being returned by diesel at src/aardwolf/controllers/auth.rs:37
DatabaseError(__Unknown, "relation \"aardwolf.accounts\" does not exist")
from aardwolf.
From what I understand so far, this has to do with how we set up the schema in the database, and search_path
. Default search_path
is:
aardwolf=# show search_path;
search_path
-----------------
"$user", public
(1 row)
I worked around it by:
- create a new user "aardwolf"
- change ownership of database, tables, schema to aardwolf
@pwoolcoc, Is there a reason we create a schema rather than just let it go into the default public schema for the database? If we let it go into the public schema, then the user name wouldn't have to match the database name. Or perhaps there's a way to set the search path in the migration files? Not sure which would be better, if the latter is possible.
from aardwolf.
I've been unable to replicate this issue, unfortunately. The search_path
shouldn't be an issue here, diesel
knows about postgres schemas and generates queries with the fully qualified name, which means the search_path isn't needed to locate the table. Could you narrow down exactly what is about your environment that causes this? My search path is the same as yours, and I don't need to do either of the workarounds to get this to work.
from aardwolf.
The only thing I can think of off the top of my head is that I had used a different username than the database name. @BanjoFox had the problem too, and we applied the same work-around, and it worked. I'll let you know if I think of anything more that might help us solve this.
from aardwolf.
Thanks, my username is my local user and it's always just worked for me. The username shouldn't affect how postgres looks for the tables since diesel uses the fully-qualified name in the queries.
from aardwolf.
It might be helpful to enable logging for your postgres server (if it isn't already) and set it to all
. I see lines like this when I create an account:
LOG: execute <unnamed>: INSERT INTO "aardwolf"."accounts" ("username") VALUES ($1) RETURNING "aardwolf"."accounts"."id", "aardwolf"."accounts"."username", "aardwolf"."accounts"."domain", "aardwolf"."accounts"."display_name", "aardwolf"."accounts"."created_at", "aardwolf"."accounts"."updated_at"
DETAIL: parameters: $1 = 'testing'
LOG: execute <unnamed>: INSERT INTO "aardwolf"."users" ("encrypted_password", "account_id", "unconfirmed_email", "confirmation_token", "confirmation_sent_at") VALUES ($1, $2, $3, $4, $5) RETURNING "aardwolf"."users"."id", "aardwolf"."users"."email", "aardwolf"."users"."encrypted_password", "aardwolf"."users"."account_id", "aardwolf"."users"."admin", "aardwolf"."users"."disabled", "aardwolf"."users"."unconfirmed_email", "aardwolf"."users"."confirmation_token", "aardwolf"."users"."confirmed_at", "aardwolf"."users"."confirmation_sent_at", "aardwolf"."users"."created_at", "aardwolf"."users"."updated_at"
DETAIL: parameters: $1 = '$2y$12$CFhS4vfRzDHamzagNUtf1ulR8ptZX4OsERHRMPx5Q5ugASxCxFTg2', $2 = '4da6cfb7-8540-4b13-94e9-eccc51c1e895', $3 = '[email protected]', $4 = '\xf74eec7acec3261f82053b7f46704213', $5 = '2018-01-02 19:21:35.327884'
When the query fails, it might be worth trying those same queries in psql
to if diesel
is doing something wrong.
from aardwolf.
It should be easy enough to replicate on the test-server. Blow away the DB, and start fresh :)
from aardwolf.
As long as nothing gets in the way, the new setup program seems to have fixed things. I just wiped out my aardwolf database, re-configured aardwolf to use my db account, and ran the setup. This time around, I was able to create, confirm, and log into an account without issue. Closing.
However, there is a problem with the new setup program. Please see Issue #63.
from aardwolf.
Related Issues (20)
- Feature Requirement: Events HOT 11
- I don't like having forkawesome dominating our repository HOT 4
- There are no uniqueness constraints in the database
- No fediverse account in ReadMe HOT 8
- Creating new user gives 404
- Runtime Problem: Illegal Instruction HOT 1
- Backend Bug - the trait `rocket::fairing::Fairing` is not implemented for `rocket_i18n::I18n` HOT 3
- [Security Issue] - Update WebPack HOT 1
- [Backend] - Explore migration to Actix-Web HOT 12
- configuration property "Log.file" not found' HOT 5
- [Documentation] - Review main README.md
- TODO: Refactor form state into trait
- 'compile_i18n!' fails with NotFound HOT 4
- Support for Decentralized Identifier
- Fix code scanning alert - this expression creates a reference which is immediately dereferenced by the compiler
- Fix code scanning alert - the following explicit lifetimes could be elided: 'b
- Backend Module API
- Frontend Module API
- Database Module API
- error[E0425]: cannot find value `assets` in this scope HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aardwolf.