-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Description
Bug
scripts/deploy.sh copies server/, client/out/, app.yaml, and requirements.txt to the staging directory, but does not copy alembic/ or alembic.ini.
On app startup, run_migrations() searches for alembic.ini in these paths:
<app_root>/alembic.ini/app/python/source_code/alembic.ini./alembic.ini
Since none of these exist in the deployed package, the migration is silently skipped. As a result, the database tables (projects, conversations, messages, project_backup, executions) are never created, and the app fails immediately on first use with:
psycopg.errors.UndefinedTable: relation "projects" does not exist
Steps to Reproduce
- Follow the deployment guide: create Lakebase, create app, add resource, configure
app.yaml, run./scripts/deploy.sh <app-name> - Open the app URL
- Attempt to create a project → Error: Failed to create project
Fix
Add the following lines to the staging copy section of deploy.sh:
# Copy alembic migrations
cp alembic.ini "$STAGING_DIR/"
cp -r alembic "$STAGING_DIR/"
Workaround
Manually create the tables after first deploy by generating a Lakebase OAuth token and running create_tables() from a local Python session with LAKEBASE_PG_URL set.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels