diff --git a/README.md b/README.md index bc3e04a090..99ee735cb8 100644 --- a/README.md +++ b/README.md @@ -125,10 +125,21 @@ Update your `.env` file with the database URL: DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio" ``` -4. Set up the database (from packages/db): +4. Set up the database: +First, configure the database package environment: ```bash cd packages/db +cp .env.example .env +``` + +Update your `packages/db/.env` file with the database URL: +```bash +DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio" +``` + +Then run the migrations: +```bash bunx drizzle-kit migrate --config=./drizzle.config.ts ``` diff --git a/packages/db/.env.example b/packages/db/.env.example new file mode 100644 index 0000000000..93591dc12d --- /dev/null +++ b/packages/db/.env.example @@ -0,0 +1,2 @@ +# Database URL (Required for migrations and database operations) +DATABASE_URL="postgresql://postgres:password@localhost:5432/simstudio" \ No newline at end of file