Database migrations
Telescope uses Django’s migration system to manage database schema changes. When a release includes a “Migration required” note in the changelog, you need to apply pending migrations after updating to the new version.
Django migration commands
Section titled “Django migration commands”# View all pending migrationspython manage.py showmigrations
# View only Telescope migrationspython manage.py showmigrations telescope
# Apply all pending migrationspython manage.py migrateBy installation type
Section titled “By installation type”No action required. The Helm chart includes a migration init container that runs python manage.py migrate automatically before Telescope starts. Migrations are applied on every deployment.
If you want to disable this behavior, set initContainers.migrations.enabled: false in your values.yaml.
Docker
Section titled “Docker”After pulling the new image, run migrations using a one-off container before (or instead of) restarting your main container:
docker run --rm \ -e TELESCOPE_CONFIG_FILE=/config.yaml \ -v $(realpath ~/.telescope/config.yaml):/config.yaml \ -v $(realpath ~/.telescope/db.sqlite3):/db.sqlite3 \ ghcr.io/iamtelescope/telescope:<version> \ python manage.py migrateAdjust the volume mounts to match your actual config and database paths. If you are using PostgreSQL or another external database, the -v mount for the database file is not needed.
If your container is already running, you can exec into it instead:
docker exec -it -e TELESCOPE_CONFIG_FILE=/path/to/config.yaml <container_name> python manage.py migrateRaw Python
Section titled “Raw Python”Activate your virtual environment, set the config file path, and run:
source venv/bin/activateexport TELESCOPE_CONFIG_FILE=/path/to/config.yamlcd backendpython manage.py migrate