Hi, This should be fixed as of the latest version of Django Evolution. We'll be updating to use that in the upcoming 7.0.3 release.
Can you try installing that and trying again: /opt/reviewboard/bin/pip install -U django-evolution Christian On Fri, Nov 1, 2024 at 7:31 AM Ying Jiang <clydauscar1...@gmail.com> wrote: > Hi, > > > > We try to migrate a review board site(3.0.16) running on CentOS 7.9 to a > new RHEL9.4 server. > > During the migration, everything looks good but when I try to upgrade the > site, it hits error below > > > —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— > > Upgrading Review Board from 3.0.16 to 7.0.2 > > > —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— > > > > Rebuilding directory structure ... OK > > > > Updating database. This may take a while. Please be patient and DO NOT > CANCEL! > > > > Creating new database models for oauth2_provider... > > Creating new database models for accounts... > > Creating new database models for diffviewer... > > Applying database evolution for site... > > Applying database evolution for oauth... > > Applying database evolution for oauth2_provider... > > > > > > [!] There was an error updating the database: > > > > Error applying evolution for oauth2_provider: (1833, "Cannot > change column 'id': used in a foreign key constraint > > 'oauth2_provider_accesstoken_ibfk_1' of table > 'reviewboard.oauth2_provider_accesstoken'") > > > > This could be caused by bad permissions or configuration, manual > changes to your database schema, corruption, an > > incomplete upgrade, or missing database upgrade history. > > > > If this was due to bad permissions or configuration, please fix that > and try again. > > > > If this is unexpected, and you do not have a backup, you may need to > contact Beanbag support for a manual repair. Please > > check our support options at https://www.reviewboard.org/support/ and > provide the file "/var/www/reviews/logs/site- > > upgrade-failure.log" when speaking to support. > > > > If I run the upgrade command again, it will show up another error > > > —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— > > Upgrading the Review Board site directory > > > —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— > > > > Rebuilding directory structure ... OK > > Traceback (most recent call last): > > File "/opt/reviewboard/bin/rb-site", line 8, in <module> > > sys.exit(main()) > > File > "/opt/reviewboard/lib/python3.9/site-packages/reviewboard/cmdline/rbsite.py", > line 3326, in main > > command.run(site, options) > > File > "/opt/reviewboard/lib/python3.9/site-packages/reviewboard/cmdline/rbsite.py", > line 2844, in run > > site.update_database(report_progress=True) > > File > "/opt/reviewboard/lib/python3.9/site-packages/reviewboard/cmdline/rbsite.py", > line 610, in update_database > > diff = evolver.diff_evolutions() > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/evolve/evolver.py", > line 261, in diff_evolutions > > self._prepare_tasks() > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/evolve/evolver.py", > line 459, in _prepare_tasks > > task_cls.prepare_tasks(evolver=self, > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/evolve/evolve_app_task.py", > line 118, in prepare_tasks > > super(EvolveAppTask, cls).prepare_tasks( > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/evolve/base.py", > line 68, in prepare_tasks > > task.prepare(**kwargs) > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/evolve/evolve_app_task.py", > line 1313, in prepare > > mutations_info = self.generate_mutations_info( > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/evolve/evolve_app_task.py", > line 1179, in generate_mutations_info > > app_mutator.run_mutations(mutations) > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/mutators/app_mutator.py", > line 173, in run_mutations > > self.run_mutation(mutation) > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/mutators/app_mutator.py", > line 166, in run_mutation > > mutator.run_mutation(mutation) > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/mutators/model_mutator.py", > line 320, in run_mutation > > super(ModelMutator, self).run_mutation( > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/mutators/base.py", > line 154, in run_mutation > > mutation.mutate(self, **mutate_kwargs) > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/mutations/add_field.py", > line 131, in mutate > > self.add_column(mutator, model) > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/mutations/add_field.py", > line 143, in add_column > > field = self._create_field(mutator, model) > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/mutations/add_field.py", > line 206, in _create_field > > return create_field(project_sig=mutator.project_sig, > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/mock_models.py", > line 61, in create_field > > project_sig > > File > "/opt/reviewboard/lib/python3.9/site-packages/django_evolution/signature.py", > line 839, in get_model_sig > > raise MissingSignatureError( > > django_evolution.errors.MissingSignatureError: Unable to find a model > signature for "oauth2_provider.IDToken". syncdb/migrate might need to be > run first. > > > > I’ve tried everything I could think through, but the issue persists. > > Can anyone help to suggest how to fix it? Thanks in advance. > > > > Best Regards! > > -- > Supercharge your Review Board with Power Pack: > https://www.reviewboard.org/powerpack/ > Want us to host Review Board for you? Check out RBCommons: > https://rbcommons.com/ > Happy user? Let us know! https://www.reviewboard.org/users/ > --- > You received this message because you are subscribed to the Google Groups > "Review Board Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to reviewboard+unsubscr...@googlegroups.com. > To view this discussion visit > https://groups.google.com/d/msgid/reviewboard/b8ec7aef-6edb-4bf9-8a6e-7cd5254becffn%40googlegroups.com > <https://groups.google.com/d/msgid/reviewboard/b8ec7aef-6edb-4bf9-8a6e-7cd5254becffn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Christian Hammond President/CEO of Beanbag <https://www.beanbaginc.com/> Makers of Review Board <https://www.reviewboard.org/> -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "Review Board Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/reviewboard/CAE7Vnd%3DQ96wB8D90LQ%2BmXxCEjSR2F1M_ArCBMspmnfE8XytTJw%40mail.gmail.com.