diff --git a/atuin-server/migrations/20220426080938_history-index.sql b/atuin-server/migrations/20220426080938_history-index.sql deleted file mode 100644 index 2d2a563..0000000 --- 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 d7afeea..1a3e33b 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 { 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",