Can't update past 0.30.5
- Version of Dawarich you're experiencing your problem on 0.30.5 Dawarich on Debian vm in docker
- Make sure your Dawarich instance is running in development environment. The production is not yet ready and not recommended to use.
My docker compose.yml
services:
dawarich_redis:
image: redis:7.4-alpine
container_name: dawarich_redis
command: redis-server
networks:
- dawarich_network
volumes:
- ./dawarich_shared:/data
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
dawarich_db:
image: postgis/postgis:17-3.5-alpine
shm_size: 1G
container_name: dawarich_db
volumes:
- ./dawarich_db_data:/var/lib/postgresql/data
- ./dawarich_shared:/var/shared
# - ./postgresql.conf:/etc/postgresql/postgresql.conf # Optional, uncomment if you want to use a custom config
networks:
- dawarich_network
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d dawarich_development" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
dawarich_app:
image: freikin/dawarich:0.30.5
container_name: dawarich_app
volumes:
- ./dawarich_public:/var/app/public
- ./dawarich_watched:/var/app/tmp/imports/watched
- ./dawarich_storage:/var/app/storage
- ./dawarich_db_data:/dawarich_db_data
networks:
- dawarich_network
- web
# ports:
# - 3000:3000
# - 9394:9394 # Prometheus exporter, uncomment if needed
stdin_open: true
tty: true
entrypoint: web-entrypoint.sh
# entrypoint: /bin/sh
command: ['bin/rails', 'server', '-p', '3000', '-b', '::']
restart: unless-stopped
environment:
RAILS_ENV: development
REDIS_URL: redis://dawarich_redis:6379
DATABASE_HOST: dawarich_db
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: ${POSTGRES_PASSWORD}
DATABASE_NAME: dawarich_development
MIN_MINUTES_SPENT_IN_CITY: 60
APPLICATION_HOSTS: ${APPLICATION_HOSTS}
TIME_ZONE: America/Los_Angeles
APPLICATION_PROTOCOL: http
DISTANCE_UNIT: km
PROMETHEUS_EXPORTER_ENABLED: "false"
PROMETHEUS_EXPORTER_HOST: 0.0.0.0
PROMETHEUS_EXPORTER_PORT: 9394
ENABLE_TELEMETRY: "false" # More on telemetry: https://dawarich.app/docs/tutorials/telemetry
SELF_HOSTED: "true"
STORE_GEODATA: "true"
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
healthcheck:
test: [ "CMD-SHELL", "wget -qO - http://127.0.0.1:3000/api/v1/health | grep -q '\"status\"\\s*:\\s*\"ok\"'" ]
# test: ["CMD-SHELL", "exit 0" ]
interval: 10s
retries: 30
start_period: 30s
timeout: 10s
depends_on:
dawarich_db:
condition: service_healthy
restart: true
dawarich_redis:
condition: service_healthy
restart: true
deploy:
resources:
limits:
cpus: '0.50' # Limit CPU usage to 50% of one core
memory: '4G' # Limit memory usage to 4GB
dawarich_sidekiq:
image: freikin/dawarich:latest
container_name: dawarich_sidekiq
volumes:
- ./dawarich_public:/var/app/public
- ./dawarich_watched:/var/app/tmp/imports/watched
- ./dawarich_storage:/var/app/storage
networks:
- dawarich_network
stdin_open: true
tty: true
entrypoint: sidekiq-entrypoint.sh
command: ['sidekiq']
restart: on-failure
environment:
RAILS_ENV: development
REDIS_URL: redis://dawarich_redis:6379
DATABASE_HOST: dawarich_db
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: ${POSTGRES_PASSWORD}
DATABASE_NAME: dawarich_development
APPLICATION_HOSTS: localhost
BACKGROUND_PROCESSING_CONCURRENCY: 10
APPLICATION_PROTOCOL: http
PROMETHEUS_EXPORTER_ENABLED: "false"
PROMETHEUS_EXPORTER_HOST: dawarich_app
PROMETHEUS_EXPORTER_PORT: 9394
SELF_HOSTED: "true"
STORE_GEODATA: "true"
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
healthcheck:
test: [ "CMD-SHELL", "pgrep -f sidekiq" ]
interval: 10s
retries: 30
start_period: 30s
timeout: 10s
depends_on:
dawarich_db:
condition: service_healthy
restart: true
dawarich_redis:
condition: service_healthy
restart: true
dawarich_app:
condition: service_healthy
restart: true
networks:
dawarich_network:
external: true
web:
external: true
- Your mobile client name and version (iOS Dawarich / OwnTracks / Overland / etc.) iOS Dawarich
- OS (Ubuntu + Docker / Unraid / TrueNas / etc.) Debian + docker
- Clear and concise problem description Upgrading from 0.28.0 to 0.30.12 failed so I tried each previous version until I found one that works, which is 0.30.5.
I have tried the troubleshooting steps mentioned in https://github.com/Freika/dawarich/issues/1598 but it did not resolve the issue. In my case the "points" table does not exist in my database.
I have tried exporting my data from the website using the "Export" button but it fails instantly with the following error:
I, [2025-09-02T00:50:17.080983 #8] INFO -- : /var/app/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.2.1/lib/active_model/attribute_methods.rb:512:in 'ActiveModel::AttributeMethods#method_missing': undefined method 'points_count' for an instance of User (NoMethodError)
-
Expected behaviour Dawarich_app container should be healthy and working
-
Steps to reproduce Change version from 0.30.5 to any higher version
-
Logs from your docker containers, from your browser console (if applicable) Dawarich_app container log
Caused by: PG::DuplicateColumn: ERROR: column "country_name" of relation "points" already exists (PG::DuplicateColumn) /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in 'PG::Connection#exec' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in 'ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements#perform_query' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:556:in 'block (2 levels) in ActiveRecord::ConnectionAdapters::DatabaseStatements#raw_execute' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:1015:in 'block in ActiveRecord::ConnectionAdapters::AbstractAdapter#with_raw_connection' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.2/lib/active_support/concurrency/null_lock.rb:9:in 'ActiveSupport::Concurrency::NullLock#synchronize' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:984:in 'ActiveRecord::ConnectionAdapters::AbstractAdapter#with_raw_connection' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:555:in 'block in ActiveRecord::ConnectionAdapters::DatabaseStatements#raw_execute' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.2/lib/active_support/notifications/instrumenter.rb:58:in 'ActiveSupport::Notifications::Instrumenter#instrument' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:1135:in 'ActiveRecord::ConnectionAdapters::AbstractAdapter#log' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:554:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#raw_execute' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:591:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#internal_execute' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:137:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#execute' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:27:in 'ActiveRecord::ConnectionAdapters::AbstractAdapter#execute' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:40:in 'ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements#execute' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:640:in 'ActiveRecord::ConnectionAdapters::SchemaStatements#add_column' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/postgresql/schema_statements.rb:462:in 'ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements#add_column' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration/default_strategy.rb:10:in 'ActiveRecord::Migration::DefaultStrategy#method_missing' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1056:in 'block in ActiveRecord::Migration#method_missing' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1022:in 'block in ActiveRecord::Migration#say_with_time' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.2/lib/active_support/benchmark.rb:17:in 'ActiveSupport::Benchmark.realtime' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1022:in 'ActiveRecord::Migration#say_with_time' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1045:in 'ActiveRecord::Migration#method_missing' /var/app/vendor/bundle/ruby/3.4.0/gems/strong_migrations-2.3.0/lib/strong_migrations/migration.rb:17:in 'block (2 levels) in StrongMigrations::Migration#method_missing' /var/app/vendor/bundle/ruby/3.4.0/gems/strong_migrations-2.3.0/lib/strong_migrations/checker.rb:125:in 'StrongMigrations::Checker#perform_method' /var/app/vendor/bundle/ruby/3.4.0/gems/strong_migrations-2.3.0/lib/strong_migrations/checker.rb:110:in 'StrongMigrations::Checker#perform' /var/app/vendor/bundle/ruby/3.4.0/gems/strong_migrations-2.3.0/lib/strong_migrations/migration.rb:16:in 'block in StrongMigrations::Migration#method_missing' /var/app/vendor/bundle/ruby/3.4.0/gems/strong_migrations-2.3.0/lib/strong_migrations/migration.rb:15:in 'Kernel#catch' /var/app/vendor/bundle/ruby/3.4.0/gems/strong_migrations-2.3.0/lib/strong_migrations/migration.rb:15:in 'StrongMigrations::Migration#method_missing' /var/app/db/migrate/20250728191359_add_country_name_to_points.rb:5:in 'AddCountryNameToPoints#change' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:991:in 'ActiveRecord::Migration#exec_migration' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:975:in 'block (2 levels) in ActiveRecord::Migration#migrate' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.2/lib/active_support/benchmark.rb:17:in 'ActiveSupport::Benchmark.realtime' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:974:in 'block in ActiveRecord::Migration#migrate' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:412:in 'ActiveRecord::ConnectionAdapters::ConnectionPool#with_connection' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:973:in 'ActiveRecord::Migration#migrate' /var/app/vendor/bundle/ruby/3.4.0/gems/strong_migrations-2.3.0/lib/strong_migrations/migration.rb:5:in 'StrongMigrations::Migration#migrate' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1187:in 'ActiveRecord::MigrationProxy#migrate' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1535:in 'block in ActiveRecord::Migrator#execute_migration_in_transaction' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1588:in 'ActiveRecord::Migrator#ddl_transaction' /var/app/vendor/bundle/ruby/3.4.0/gems/strong_migrations-2.3.0/lib/strong_migrations/migrator.rb:4:in 'StrongMigrations::Migrator#ddl_transaction' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1534:in 'ActiveRecord::Migrator#execute_migration_in_transaction' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1509:in 'Array#each' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1509:in 'ActiveRecord::Migrator#migrate_without_lock' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1454:in 'block in ActiveRecord::Migrator#migrate' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1606:in 'ActiveRecord::Migrator#with_advisory_lock' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1454:in 'ActiveRecord::Migrator#migrate' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1261:in 'ActiveRecord::MigrationContext#up' /var/app/vendor/bundle/ruby/3.4.0/gems/strong_migrations-2.3.0/lib/strong_migrations/migration_context.rb:4:in 'StrongMigrations::MigrationContext#up' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/migration.rb:1236:in 'ActiveRecord::MigrationContext#migrate' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/tasks/database_tasks.rb:270:in 'ActiveRecord::Tasks::DatabaseTasks#migrate' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/tasks/database_tasks.rb:248:in 'ActiveRecord::Tasks::DatabaseTasks#migrate_all' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.2/lib/active_record/railties/databases.rake:90:in 'block (2 levels) in <main>' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/task.rb:281:in 'block in Rake::Task#execute' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/task.rb:281:in 'Array#each' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/task.rb:281:in 'Rake::Task#execute' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/task.rb:219:in 'block in Rake::Task#invoke_with_call_chain' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/task.rb:199:in 'Monitor#synchronize' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/task.rb:199:in 'Rake::Task#invoke_with_call_chain' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/task.rb:188:in 'Rake::Task#invoke' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/application.rb:188:in 'Rake::Application#invoke_task' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/application.rb:138:in 'block (2 levels) in Rake::Application#top_level' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/application.rb:138:in 'Array#each' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/application.rb:138:in 'block in Rake::Application#top_level' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/application.rb:147:in 'Rake::Application#run_with_threads' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/application.rb:132:in 'Rake::Application#top_level' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/commands/rake/rake_command.rb:27:in 'block (2 levels) in Rails::Command::RakeCommand.perform' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/application.rb:214:in 'Rake::Application#standard_exception_handling' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/commands/rake/rake_command.rb:27:in 'block in Rails::Command::RakeCommand.perform' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/commands/rake/rake_command.rb:44:in 'block in Rails::Command::RakeCommand.with_rake' /var/app/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/lib/rake/rake_module.rb:59:in 'Rake.with_application' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/commands/rake/rake_command.rb:41:in 'Rails::Command::RakeCommand.with_rake' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/commands/rake/rake_command.rb:20:in 'Rails::Command::RakeCommand.perform' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/command.rb:150:in 'Rails::Command.invoke_rake' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/command.rb:67:in 'block in Rails::Command.invoke' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/command.rb:143:in 'Rails::Command.with_argv' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/command.rb:63:in 'Rails::Command.invoke' /var/app/vendor/bundle/ruby/3.4.0/gems/railties-8.0.2/lib/rails/commands.rb:18:in '<main>' /usr/local/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require' /usr/local/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require' /var/app/vendor/bundle/ruby/3.4.0/gems/bootsnap-1.18.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in 'Kernel#require' bin/rails:4:in '<main>' Tasks: TOP => db:migrate
Caused by: PG::DuplicateColumn: ERROR: column "country_name" of relation "points" already exists
you need to delete country_name column from points table, chatgpt it and try again