New request
#20062: Setup script doesn't initialize database schema
We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.
Issue
sonarly:medium
Description:
The setup-dev-env.sh script sets up Docker/PostgreSQL infrastructure but doesn't initialize the Twenty CRM database schema. After running the script, the backend fails with errors like: relation "core.appToken" does not exist relation "core.keyValuePair" does not exist
Root Cause:
- The script creates empty databases but doesn't run schema migrations
- Missing step: npx nx database:init twenty-server
Proposed Fix:
Add to setup-dev-env.sh after creating databases (line 221-222):
Run database migrations to create schema npx nx database:init twenty-server
Assessmentadvisory
bug● easy95% confidence
The setup script is missing a documented initialization step, causing fresh environments to fail with missing-relation errors; fix is a localized addition of one command in a single shell script.
Likely files
- setup-dev-env.sh
- package.json
Create the request