Add script to add vector to database

This commit is contained in:
Christopher
2023-12-13 16:41:29 -06:00
parent ce91f0eb6e
commit 3c729c878b
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
In the Immich 1.90.2 version, there are breaking changes where you need to add the vector to the database. This script will help you to add the vector to the database.
https://github.com/immich-app/immich/releases/tag/v1.90.2
https://github.com/bigbeartechworld/big-bear-casaos/pull/20#issuecomment-1853675544
# Run command
```bash
bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/immich-add-vector-to-db/run.sh)"
```

View File

@@ -0,0 +1,13 @@
#!/bin/bash
# Define PostgreSQL connection parameters
POSTGRES_CONTAINER="immich-postgres"
POSTGRES_DB="immich"
POSTGRES_USER="casaos"
POSTGRES_PASSWORD="casaos" # Ensure this matches your actual password
# Command to create the extension
CREATE_EXTENSION_COMMAND="CREATE EXTENSION IF NOT EXISTS vectors;"
# Connect to the PostgreSQL container and execute the command
docker exec -it $POSTGRES_CONTAINER psql -U $POSTGRES_USER -d $POSTGRES_DB -c "$CREATE_EXTENSION_COMMAND"