diff --git a/immich-add-vector-to-db/README.md b/immich-add-vector-to-db/README.md new file mode 100644 index 0000000..c927dd6 --- /dev/null +++ b/immich-add-vector-to-db/README.md @@ -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)" +``` diff --git a/immich-add-vector-to-db/run.sh b/immich-add-vector-to-db/run.sh new file mode 100644 index 0000000..ce23ece --- /dev/null +++ b/immich-add-vector-to-db/run.sh @@ -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"