9 lines
343 B
Bash
9 lines
343 B
Bash
|
|
#!/bin/sh
|
||
|
|
# Runs once on first DB init. Enables pgvector at the database level. The platform EF migration
|
||
|
|
# also runs CREATE EXTENSION (idempotent); this guarantees it even if migrations are disabled.
|
||
|
|
set -e
|
||
|
|
|
||
|
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-'EOSQL'
|
||
|
|
CREATE EXTENSION IF NOT EXISTS vector;
|
||
|
|
EOSQL
|