Automatic udpate

This commit is contained in:
Alexandre
2025-02-15 11:31:48 +01:00
parent 71bafea284
commit 3844b03342
3 changed files with 2 additions and 2 deletions

View File

@@ -1,4 +1,3 @@
## 15.7-23 (15-02-2025)
- Major update, please backup first
- Automatic handling of upgrades
- Restore clean shutdown

View File

@@ -38,5 +38,5 @@
"slug": "postgres",
"udev": true,
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/postgres",
"version": "15.7-23"
"version": "15.7-24"
}

View File

@@ -147,6 +147,7 @@ check_vector_extension() {
enable_vector_extension() {
bashio::log.info "Enabling 'vectors' extension..."
psql "postgres://$DB_USERNAME:$DB_PASSWORD@$DB_HOSTNAME:$DB_PORT" -c "DROP EXTENSION IF EXISTS vectors; CREATE EXTENSION vectors;" >/dev/null 2>&1
psql "postgres://$DB_USERNAME:$DB_PASSWORD@$DB_HOSTNAME:$DB_PORT" -c "ALTER EXTENSION vectors UPDATE; SELECT pgvectors_upgrade();" >/dev/null 2>&1
}
# Function: Store the current pgvector.rs version in a file