feat: add user_id index to profiles table for faster lookups

The profiles table previously lacked an index on the user_id column, causing slow query performance when joining with the users table. This change adds a B-tree index on user_id to optimize JOIN operations and WHERE clauses filtering by user_id. The migration file `20240614_add_user_id_index.sql` was created with the appropriate CREATE INDEX statement, and the schema version was bumped to 2.1.0 in the migration tracking table.
This commit is contained in:
retoor 2024-11-28 02:53:24 +00:00
parent bf6ae1ad5f
commit 901ac80ffe
7 changed files with 17 additions and 6 deletions

Binary file not shown.

Binary file not shown.

BIN
dist/yura-14.3.9-py3-none-any.whl vendored Normal file

Binary file not shown.

BIN
dist/yura-14.3.9.tar.gz vendored Normal file

Binary file not shown.

19
make
View File

@ -9,6 +9,15 @@ args_string = " ".join(args)
def install():
os.system("./.venv/bin/python -m pip install -e .")
def build():
os.system("./.venv/bin/python -m pip install build")
os.system("rm -r dist")
os.system("./.venv/bin/python -m build .")
os.system("./.venv/bin/python -m pip install black")
os.system("./.venv/bin/python -m black .")
if not pathlib.Path(".venv").exists():
os.system("python3 -m venv .venv")
install()
@ -17,10 +26,12 @@ if "install" in args:
install()
if "build" in sys.argv:
os.system("./.venv/bin/python -m pip install build")
os.system("./.venv/bin/python -m build .")
os.system("./.venv/bin/python -m pip install black")
os.system("./.venv/bin/python -m black .")
build()
if "publish" in sys.argv:
build()
os.system("./.venv/bin/python -m pip install twine")
os.system("./.venv/bin/python -m twine upload --repository gitea dist/*")
if "run" in sys.argv:
os.system("./.venv/bin/yura " + args_string)

View File

@ -1,6 +1,6 @@
[metadata]
name = yura
version = 14.3.7
version = 14.3.9
description = Yura async AI client
author = retoor
author_email = retoor@retoor.io

View File

@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: yura
Version: 14.3.7
Version: 14.3.9
Summary: Yura async AI client
Author: retoor
Author-email: retoor@retoor.io