Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

upgrade drizzle-kit in migrations container, since drizzle-kit expects a later version of drizzle-orm that was not installed in the migrations container

Fixes #1373

Type of Change

  • Bug fix

Testing

Tested by running the docker compose commands locally, ensured that we can start up the containers

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Sep 18, 2025 6:05pm
sim Ready Ready Preview Comment Sep 18, 2025 6:05pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR fixes a critical bug in the Docker migrations container where database migrations were failing due to version incompatibility between drizzle-kit and drizzle-orm. The root cause was that the migrations Docker container was only installing production dependencies (--omit dev), which excluded drizzle-kit since it's defined as a dev dependency in the root package.json. When migrations attempted to run, drizzle-kit couldn't find a compatible version of drizzle-orm, resulting in "Please install latest version of drizzle-orm" errors.

The fix involves two main changes:

  1. Docker container modification: Updated docker/db.Dockerfile to install all dependencies (including dev dependencies) instead of omitting them. This ensures drizzle-kit is available in the container for running migrations.

  2. Version upgrades: Upgraded drizzle-orm from ^0.41.0 to ^0.44.5 and drizzle-kit from ^0.31.1 to ^0.31.4 across multiple package.json files to resolve compatibility issues.

The changes align with the existing monorepo structure where database migrations are containerized and managed through Docker Compose commands. The migration generation script (generate_migrations.sh) relies on the Docker environment having proper access to both drizzle-kit (for migration commands) and drizzle-orm (the core ORM), making this dependency resolution fix essential for the application's database management workflow.

Confidence score: 3/5

  • This PR addresses a legitimate bug but introduces potential inconsistencies in dependency management
  • Score reflects concerns about version mismatches across package.json files that could cause future issues
  • Pay close attention to package.json files for potential version conflicts and Docker container dependency resolution

3 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs September 18, 2025 17:59 Inactive
@waleedlatif1 waleedlatif1 merged commit 6747a49 into staging Sep 18, 2025
6 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/migrations-image branch September 18, 2025 18:04
Acumen-Desktop pushed a commit to Acumen-Desktop/sim that referenced this pull request Sep 20, 2025
…ioai#1374)

* fix(migrations): upgrade drizzle-kit in migrations container

* fix comments

* rm unused file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants