mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-05-31 12:11:41 -04:00
Add script to add vector to database
This commit is contained in:
11
immich-add-vector-to-db/README.md
Normal file
11
immich-add-vector-to-db/README.md
Normal 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)"
|
||||
```
|
||||
13
immich-add-vector-to-db/run.sh
Normal file
13
immich-add-vector-to-db/run.sh
Normal 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"
|
||||
Reference in New Issue
Block a user