makeplane / makeplane/plane

[bug]: Migration is broken and app won't start

Open
#7,310 1 comment 0 reactions 2 assignees View on GitHub

@vihar is already working on this.

Since Jul 1, 2025.

🐛bug
Dominant language
TypeScript
Stars
59.6k
Forks
5.8k
Avg merge
1d 22h
Merged PRs (30d)
49

Description

Is there an existing issue for this?
  • I have searched the existing issues
Current behavior

I have created a docker-compose which looks like

x-app-env: &app-env
  DATABASE_URL: sqlite:////plane_data/plane.db

  # Redis Settings (also used as a Celery broker)
  REDIS_HOST: plane-redis
  REDIS_PORT: 6379
  REDIS_URL: redis://plane-redis:6379/
  CELERY_BROKER_URL: redis://plane-redis:6379/0
  CELERY_RESULT_BACKEND: redis://plane-redis:6379/0

  # Disable RabbitMQ
  RABBITMQ_HOST: ""
  RABBITMQ_PORT: ""
  RABBITMQ_DEFAULT_USER: ""
  RABBITMQ_DEFAULT_PASS: ""
  RABBITMQ_DEFAULT_VHOST: ""

  # Application Settings
  WEB_URL: http://localhost:8080
  CORS_ALLOWED_ORIGINS: "http://localhost:8080,http://127.0.0.1:8080"
  ALLOWED_HOSTS: "localhost,127.0.0.1,plane-app"

  # File Storage - Local
  USE_MINIO: 0
  FILE_SIZE_LIMIT: 10485760 # 10Mb

  ENABLE_SIGNUP: 1
  SECRET_KEY: abc123

  DEBUG: 1

services:
  plane-app:
    image: makeplane/plane-backend:latest
    restart: unless-stopped
    command: >
      sh -c "
      python manage.py migrate &&
      python manage.py collectstatic --noinput &&
      gunicorn plane.wsgi:application --bind 0.0.0.0:8000 --workers 2 --timeout 120 --log-level debug &
      celery -A plane worker --loglevel=info &
      celery -A plane beat --loglevel=info &
      wait"
    environment: *app-env
    depends_on:
      - plane-redis
    ports:
      - "8000:8000"
    volumes:
      - plane_data:/plane_data        # This matches the DATABASE_URL path
      - uploads:/code/plane/uploads   # Keep this for file uploads

  plane-web:
    image: makeplane/plane-frontend:latest
    restart: unless-stopped
    environment:
      NEXT_PUBLIC_API_BASE_URL: http://localhost:8000
      WEB_URL: http://localhost:8080
      NODE_ENV: production
      PORT: 3000
      HOSTNAME: 0.0.0.0
    depends_on:
      - plane-app
    ports:
      - "8080:3000"
    command: ["sh", "-c", "cd web && node server.js"]    

  plane-redis:
    image: redis:7-alpine
    restart: unless-stopped
    command: redis-server --maxmemory 128mb --maxmemory-policy allkeys-lru
    volumes:
      - redis_data:/data

volumes:
  plane_data:
  uploads:
  redis_data:

When I launch the docker stack I can see the container is running but when I shell into the backend container I notice that the server is not running and the migrations have not successfully run.

From inside the container

python manage.py runserver

INFO 2025-07-01 16:21:42,274 autoreload 292 123676183046952 Watching for file changes with StatReloader
Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/site-packages/django/utils/autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/runserver.py", line 133, in inner_run
    self.check(display_num_errors=True)
  File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 556, in check
    raise SystemCheckError(msg)
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
db.Account.provider: (fields.E120) CharFields must define a 'max_length' attribute.

System check identified 1 issue (0 silenced).

If I then attempt to run the migration

python manage.py migrate --skip-checks

Operations to perform:
  Apply all migrations: auth, contenttypes, db, django_celery_beat, license, sessions
Running migrations:
  Applying db.0001_initial...Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 87, in _execute
    return self.cursor.execute(sql)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 324, in execute
    return super().execute(query)
           ^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: near "[10]": syntax error

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/code/manage.py", line 17, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 106, in wrapper
    res = handle_func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/migrate.py", line 356, in handle
    post_migrate_state = executor.migrate(
                         ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py", line 135, in migrate
    state = self._migrate_all_forwards(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
    state = self.apply_migration(
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
    state = migration.apply(state, schema_editor)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/db/migrations/migration.py", line 132, in apply
    operation.database_forwards(
  File "/usr/local/lib/python3.12/site-packages/django/db/migrations/operations/models.py", line 96, in database_forwards
    schema_editor.create_model(model)
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/schema.py", line 451, in create_model
    self.execute(sql, params or None)
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/schema.py", line 201, in execute
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 102, in execute
    return super().execute(sql, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 87, in _execute
    return self.cursor.execute(sql)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 324, in execute
    return super().execute(query)
           ^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.OperationalError: near "[10]": syntax error

This looks like an issue with Sqlite.

Steps to reproduce

Run docker compose file
Shell into container
python manage.py runserver
python manage.py migrate --skip-checks

Environment

Production

Browser

None

Variant

Cloud

Version

latest

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.