container build v3.0.94-20240304103214 missing fixes
Opened this issue · 6 comments
Trying to do a clean build on a new machine using v3.0.94-20240304103214 but getting 'index_together' error which looks to be exactly what this version should fix. Looking inside the container I can see the updated models.py but somehow doesn't seem to be being picked up?
2024-03-05 08:31:19 Initializing/Updating RaceDB Database...
2024-03-05 08:31:19 RaceDBVersion=v3.0.94-20240304103214
2024-03-05 08:31:19 databaseEngine="django.db.backends.postgresql"
2024-03-05 08:31:19 databaseName="racedb"
2024-03-05 08:31:19 ServerTimeZone="Europe/London"
2024-03-05 08:31:19 python="3.10.13 (main, Jan 27 2024, 07:28:36) [GCC 13.2.1 20231014]"
2024-03-05 08:31:19 logFileName="/racedb-data/RaceDB-log.txt"
2024-03-05 08:31:20 Operations to perform:
2024-03-05 08:31:20 Apply all migrations: admin, auth, contenttypes, core, sessions
2024-03-05 08:31:20 Running migrations:
2024-03-05 08:31:20 Traceback (most recent call last):
2024-03-05 08:31:20 File "/RaceDB/manage.py", line 34, in
2024-03-05 08:31:20 execute_from_command_line(sys.argv)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
2024-03-05 08:31:20 utility.execute()
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 436, in execute
2024-03-05 08:31:20 self.fetch_command(subcommand).run_from_argv(self.argv)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 413, in run_from_argv
2024-03-05 08:31:20 self.execute(*args, **cmd_options)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 459, in execute
2024-03-05 08:31:20 output = self.handle(*args, **options)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 107, in wrapper
2024-03-05 08:31:20 res = handle_func(*args, **kwargs)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 356, in handle
2024-03-05 08:31:20 post_migrate_state = executor.migrate(
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 135, in migrate
2024-03-05 08:31:20 state = self._migrate_all_forwards(
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
2024-03-05 08:31:20 state = self.apply_migration(
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
2024-03-05 08:31:20 state = migration.apply(state, schema_editor)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/migration.py", line 118, in apply
2024-03-05 08:31:20 operation.state_forwards(self.app_label, project_state)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/operations/models.py", line 82, in state_forwards
2024-03-05 08:31:20 state.add_model(
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/state.py", line 124, in add_model
2024-03-05 08:31:20 self.reload_model(*model_key)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/state.py", line 400, in reload_model
2024-03-05 08:31:20 self._reload(related_models)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/state.py", line 435, in _reload
2024-03-05 08:31:20 self.apps.render_multiple(states_to_be_rendered)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/state.py", line 665, in render_multiple
2024-03-05 08:31:20 model.render(self)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/migrations/state.py", line 956, in render
2024-03-05 08:31:20 return type(self.name, bases, body)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/models/base.py", line 143, in new
2024-03-05 08:31:20 new_class.add_to_class("_meta", Options(meta, app_label))
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/models/base.py", line 371, in add_to_class
2024-03-05 08:31:20 value.contribute_to_class(cls, name)
2024-03-05 08:31:20 File "/usr/local/lib/python3.10/site-packages/django/db/models/options.py", line 210, in contribute_to_class
2024-03-05 08:31:20 warnings.warn(
2024-03-05 08:31:20 django.utils.deprecation.RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'core.ParticipantOption' instead.
ok - so it seems that core/models.py contains the changes, but the migration core/migrations/0001_initial.py does not
fix here: #57
Has that fix been propagated to Ed's current RaceDB docker config?
I am still seeing problems trying to do "./racedb.start" from RaceDB/docker.
[racedb-v3.0.96-20240317044838.log](https://github.com/esitarski/RaceDB/files/14654371/racedb-v3.0.96-20240317044838.log)
I can’t merge it - Ed needs to review/approve
Well interesting. I can get RaceDB running with the current image. But when I import my RaceDB database (json dump) only competitions up to 2021 get imported. Or possibly, for some reason, the recent (2024) competitions are not being displayed.
The test was run with an export from my working system that I loaded onto the race laptop earlier today (running the older image.) So the dump does have the current competitions.
This is the list on the exporting system, image tag: RaceDB v3.0.93-beta-689e615
I can provide the json if needed, it is fairly large, ~58MB.
I'll do some more testing to verify.
Some success. Using a different export.
Is there a difference between the docker/racedb.sh export, which uses manage.py dumpdata core and using the RaceDB web interface Download DB?
I have been using the racedb export. And that is what failed on import.
I tried doing the Download DB and importing that worked.