Local Environment Setup

Database Configuration

Running database migrations for CrelioHealth backend

👤 Sai Tharun

Database Configuration

10. Run Database Migrations

Step 1: Execute Migrations

  1. Enter the chapp Docker container
  2. Run the migration command:
make migrate

Step 2: Handle Failed Migrations (if any)

If any migration fails, you can fake the migration and manually create the required tables:

./develop.py migrate app_name migration_name --fake

Then manually create the required tables using SQL queries.

Step 3: Access MySQL Shell (Optional)

If you need to perform SQL operations without DataGrip:

docker exec -it <container_name_or_id> mysql -u <username> -p

On this page