diff options
author | Ellie Huxtable <ellie@elliehuxtable.com> | 2022-04-26 18:17:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 18:17:56 +0100 |
commit | f8233bcb635062f002e75aedcc50181a8573fc58 (patch) | |
tree | 738d7aba6bc480154ddb1706c1af049625505c8b /atuin-server | |
parent | d8ef5dd93aff0490258d38885d0b1077163acad6 (diff) |
SQLx cannot run this migration OK (#353)
And also correct a typo
Diffstat (limited to 'atuin-server')
-rw-r--r-- | atuin-server/migrations/20220426080938_history-index.sql | 1 | ||||
-rw-r--r-- | atuin-server/src/database.rs | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/atuin-server/migrations/20220426080938_history-index.sql b/atuin-server/migrations/20220426080938_history-index.sql deleted file mode 100644 index 2d2a56336..000000000 --- a/atuin-server/migrations/20220426080938_history-index.sql +++ /dev/null @@ -1 +0,0 @@ -create index concurrently if not exists "history_idx" on history using btree (user_id, timestamp); diff --git a/atuin-server/src/database.rs b/atuin-server/src/database.rs index d7afeea90..1a3e33b3d 100644 --- a/atuin-server/src/database.rs +++ b/atuin-server/src/database.rs @@ -99,7 +99,7 @@ impl Database for Postgres { #[instrument(skip_all)] async fn get_session_user(&self, token: &str) -> Result<User> { sqlx::query_as::<_, User>( - "select users.id, users.username, user.email, users.password from users + "select users.id, users.username, users.email, users.password from users inner join sessions on users.id = sessions.user_id and sessions.token = $1", |