Closed lleirborras closed 1 year ago
Upgrading from DEPRECATED_4.x to 4.0.x, 4.1.x or master should let the application to start
After upgrading the app refuses to start due to database migrations
List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ----------------------+----------+----------+---------+-------------+----------------------- geonode | geonode | UTF8 | C | en_US.UTF-8 | geonode_data | postgres | UTF8 | C | en_US.UTF-8 | geonode_data_initial | geonode | UTF8 | C | en_US.UTF-8 | geonode_ifad | postgres | UTF8 | C | en_US.UTF-8 | postgres | postgres | UTF8 | C | en_US.UTF-8 | powa | postgres | UTF8 | C | en_US.UTF-8 | template0 | postgres | UTF8 | C | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | C | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (8 rows) GeoNode databases are up - executing command waitfordbs tasks done **************************migrations******************************* Traceback (most recent call last): File "/usr/src/geonode/manage.py", line 29, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 354, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 398, in execute output = self.handle(*args, **options) File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 89, in wrapped res = handle_func(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 95, in handle executor.loader.check_consistent_history(connection) File "/usr/local/lib/python3.10/site-packages/django/db/migrations/loader.py", line 306, in check_consistent_history raise InconsistentMigrationHistory( django.db.migrations.exceptions.InconsistentMigrationHistory: Migration upload.0033_auto_20210531_1252 is applied before its dependency upload.0033_auto_20210528_1556 on database 'default'.
At this point the docker for Django will start respawning over and over after throwing the message shown before
@lleirborras connect to the geonode DB and run the following SQL statements
https://github.com/GeoNode/geonode/issues/10179#issuecomment-1285863020
@afabiani it seems to be working, thanks a lot for the trick!
Expected Behavior
Upgrading from DEPRECATED_4.x to 4.0.x, 4.1.x or master should let the application to start
Actual Behavior
After upgrading the app refuses to start due to database migrations
Steps to Reproduce the Problem
At this point the docker for Django will start respawning over and over after throwing the message shown before
Specifications