fix(db): enable test env cold-start migrations on empty database.

Use pgvector image with extensions-only init, seed legacy users before project/chat fixtures, and align test compose with goose-only schema bootstrap.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-13 02:50:23 +00:00
committed by weichen
co-authored by Cursor
parent f73988e567
commit 72879c6e22
3 changed files with 12 additions and 2 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ name: agent-test
services:
system-db:
image: postgres:16-alpine
image: pgvector/pgvector:pg16
container_name: shuimu-system-pg-test
command: ["postgres", "-c", "shared_buffers=256MB", "-c", "max_connections=150"]
environment:
@@ -20,7 +20,7 @@ services:
- "127.0.0.1:${SYSTEM_DB_PUBLISH_PORT:-5434}:5432"
volumes:
- test-system-pgdata:/var/lib/postgresql/data
- ./deploy/postgres/system_init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
- ./deploy/postgres/extensions_init.sql:/docker-entrypoint-initdb.d/01-extensions.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${SYSTEM_DB_USER:-app} -d ${SYSTEM_DB_NAME:-agent_system_test}"]
interval: 5s