Hi,

I wanted to give you a status update on this.

This is due to a django_evolution bug, in combination with the versions
you're upgrading from/to. We have a fix in the django_evolution tree that
fixes part of this. It seems to evolve your database just fine, but there
are bugs with certain configurations that I'm aiming to fix. Once I have
that fixed (working on it), I'll feel more comfortable sending that your
way.

Give me another day or two, and I think I'll have this sorted out.

Christian

-- 
Christian Hammond
President/CEO of Beanbag <https://www.beanbaginc.com/>
Makers of Review Board <https://www.reviewboard.org/>

On Tue, Jul 26, 2016 at 12:14 PM, Christian Hammond <
christ...@beanbaginc.com> wrote:

> --hint --execute will only ever break things. Outside of developing Review
> Board itself, you'll never want to run that for any reason. It bypasses our
> evolutions and tries to brute-force, which will fail to result in the same
> schema, will lose data, and force you into a state that takes very careful
> work (by us) to get out of.
>
> I'll take a look today and let you know what I find out.
>
> Christian
>
>
> On Tuesday, July 26, 2016, Abhishek Choudhary <xabh...@gmail.com> wrote:
>
>> Hi Christian,
>>
>> PFA schema.sql and data.sql. If the database is in an inconsistent state
>> - i am okay with starting afresh as the current setup has some really old
>> data.
>>
>> I tried to do 'rb-site manage --debug ~/reviewboard/site evolve -- --hint
>> --execute' but it gave me below error. Does it give any hint for the
>> problem.
>>
>> You have requested a database evolution. This will alter tables
>> and data currently in the 'default' database, and may result in
>> IRREVERSABLE DATA LOSS. Evolutions should be *thoroughly* reviewed
>> prior to execution.
>>
>> Are you sure you want to execute the evolutions?
>>
>> Type 'yes' to continue, or 'no' to cancel: yes
>> CommandError: Error applying evolution: (1060, "Duplicate column name
>> 'diff_base64'")
>>
>>
>>
>>
>> On Tuesday, July 26, 2016 at 4:37:19 PM UTC+5:30, Christian Hammond wrote:
>>>
>>>
>>>
>>> On Tuesday, July 26, 2016, Christian Hammond <chri...@beanbaginc.com>
>>> wrote:
>>>
>>>> Hi Abhi,
>>>>
>>>> I won't be able to do much else tonight, as it's 3:40AM here, but if
>>>> you could supply the following here as attachments, we can start taking a
>>>> look tomorrow:
>>>>
>>>> 1) A schema-only dump of your database (pre-upgrade):
>>>>
>>>> mysqldump -h <host> -u <user> -p <dbname>  > schema.sql
>>>>
>>>
>>> Meant to add --no-data.
>>>
>>> Christian
>>>
>>>
>>>
>>>
>>>>
>>>> 2) A data dump of the django_project_version and django_evolution
>>>> tables:
>>>>
>>>> mysqldump -h <host> -u <user> -p <dbname> django_project_version
>>>> django_evolution > data.sql
>>>>
>>>> Neither of these will expose any confidential information, as they'll
>>>> solely cover database structures and evolution history.
>>>>
>>>> If this turns out to be a bug in Django Evolution, we'll look into the
>>>> cause and get a fix to you as soon as we have it figured out.
>>>>
>>>> If it's an issue with the database or its state, and we need to conduct
>>>> a repair, we'll need to discuss support options. We offer comprehensive
>>>> support contracts that cover any questions or problems you have with your
>>>> server, along with emergency bug fixes, upgrade assistance, and more. We
>>>> also offer database repairs on a per-hourly basis. I'll talk to you more
>>>> about that if it's deemed necessary, but if there's any interest in
>>>> confidential on-going support, I can go into more details on that.
>>>>
>>>> Christian
>>>>
>>>>
>>>>
>>>> On Tuesday, July 26, 2016, Abhishek Choudhary <xabh...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Christian,
>>>>>
>>>>> Thanks for the quick response. Yes, I had taken a backup of my data
>>>>> and I changed all my MyISAM tables to InnoDB and no longer get that unable
>>>>> to create mysql table error. But I am still facing this other error (see
>>>>> below). Could you please suggest something to work around this problem?
>>>>>
>>>>> * Installing the site...
>>>>> Building site directories ... OK
>>>>> Building site configuration files ... OK
>>>>> Creating database ... Creating tables ...
>>>>> There are unapplied evolutions for auth.
>>>>> There are unapplied evolutions for contenttypes.
>>>>> There are unapplied evolutions for accounts.
>>>>> There are unapplied evolutions for changedescs.
>>>>> There are unapplied evolutions for diffviewer.
>>>>> There are unapplied evolutions for reviews.
>>>>> There are unapplied evolutions for scmtools.
>>>>> Project signature has changed - an evolution is required
>>>>> Installing custom SQL ...
>>>>> Installing indexes ...
>>>>> Installed 0 object(s) from 0 fixture(s)
>>>>> OK
>>>>> ERROR:root:Unexpected error: u'FileDiffData'
>>>>> Traceback (most recent call last):
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/management/commands/evolve.py",
>>>>> line 65, in handle
>>>>>     self.evolve(*app_labels, **options)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/management/commands/evolve.py",
>>>>> line 125, in evolve
>>>>>     sql.extend(self.evolve_app(app))
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/management/commands/evolve.py",
>>>>> line 164, in evolve_app
>>>>>     app_mutator.run_mutations(mutations)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutators.py",
>>>>> line 279, in run_mutations
>>>>>     self.run_mutation(mutation)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutators.py",
>>>>> line 268, in run_mutation
>>>>>     model_mutator.run_mutation(mutation)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutators.py",
>>>>> line 165, in run_mutation
>>>>>     mutation.mutate(self, self.create_model())
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutations.py",
>>>>> line 446, in mutate
>>>>>     self.add_column(mutator, model)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutations.py",
>>>>> line 450, in add_column
>>>>>     self.field_type, self.field_attrs, model)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutations.py",
>>>>> line 37, in create_field
>>>>>     related_model_sig = proj_sig[related_app_name][related_model_name]
>>>>> KeyError: u'FileDiffData'
>>>>> Performing migrations ... Traceback (most recent call last):
>>>>>   File "/u/choudhab/reviewboard/RBenv-2.5/bin/rb-site", line 9, in
>>>>> <module>
>>>>>     load_entry_point('ReviewBoard==2.5.6.1', 'console_scripts',
>>>>> 'rb-site')()
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/ReviewBoard-2.5.6.1-py2.7.egg/reviewboard/cmdline/rbsite.py",
>>>>> line 1922, in main
>>>>>     command.run()
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/ReviewBoard-2.5.6.1-py2.7.egg/reviewboard/cmdline/rbsite.py",
>>>>> line 1247, in run
>>>>>     self.show_install_status()
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/ReviewBoard-2.5.6.1-py2.7.egg/reviewboard/cmdline/rbsite.py",
>>>>> line 1585, in show_install_status
>>>>>     site.migrate_database)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/ReviewBoard-2.5.6.1-py2.7.egg/reviewboard/cmdline/rbsite.py",
>>>>> line 1084, in step
>>>>>     func()
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/ReviewBoard-2.5.6.1-py2.7.egg/reviewboard/cmdline/rbsite.py",
>>>>> line 452, in migrate_database
>>>>>     self.run_manage_command("evolve", ["--noinput", "--execute"])
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/ReviewBoard-2.5.6.1-py2.7.egg/reviewboard/cmdline/rbsite.py",
>>>>> line 676, in run_manage_command
>>>>>     execute_from_command_line([__file__, cmd] + params)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg/django/core/management/__init__.py",
>>>>> line 399, in execute_from_command_line
>>>>>     utility.execute()
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg/django/core/management/__init__.py",
>>>>> line 392, in execute
>>>>>     self.fetch_command(subcommand).run_from_argv(self.argv)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg/django/core/management/base.py",
>>>>> line 242, in run_from_argv
>>>>>     self.execute(*args, **options.__dict__)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg/django/core/management/base.py",
>>>>> line 285, in execute
>>>>>     output = self.handle(*args, **options)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/management/commands/evolve.py",
>>>>> line 65, in handle
>>>>>     self.evolve(*app_labels, **options)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/management/commands/evolve.py",
>>>>> line 125, in evolve
>>>>>     sql.extend(self.evolve_app(app))
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/management/commands/evolve.py",
>>>>> line 164, in evolve_app
>>>>>     app_mutator.run_mutations(mutations)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutators.py",
>>>>> line 279, in run_mutations
>>>>>     self.run_mutation(mutation)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutators.py",
>>>>> line 268, in run_mutation
>>>>>     model_mutator.run_mutation(mutation)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutators.py",
>>>>> line 165, in run_mutation
>>>>>     mutation.mutate(self, self.create_model())
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutations.py",
>>>>> line 446, in mutate
>>>>>     self.add_column(mutator, model)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutations.py",
>>>>> line 450, in add_column
>>>>>     self.field_type, self.field_attrs, model)
>>>>>   File
>>>>> "/u/choudhab/reviewboard/RBenv-2.5/lib/python2.7/site-packages/django_evolution-0.7.6-py2.7.egg/django_evolution/mutations.py",
>>>>> line 37, in create_field
>>>>>     related_model_sig = proj_sig[related_app_name][related_model_name]
>>>>> KeyError: u'FileDiffData'
>>>>>
>>>>> Thanks,
>>>>> Abhi
>>>>>
>>>>> On Tuesday, July 26, 2016 at 1:06:34 AM UTC+5:30, Christian Hammond
>>>>> wrote:
>>>>>>
>>>>>> Hi Abhi,
>>>>>>
>>>>>> The problem looks like it's an InnoDB vs MyISAM table compatibility
>>>>>> issue. Your older database was likely created using MyISAM, and is now
>>>>>> trying to upgrade using InnoDB.
>>>>>>
>>>>>> You'll need to either convert your existing tables to InnoDB, or set
>>>>>> MySQL to use MyISAM by default. InnoDB is better for Review Board, 
>>>>>> though,
>>>>>> so that's the recommendation.
>>>>>>
>>>>>> You'll also want to repeat the upgrade again from a backup. (Did you
>>>>>> take a backup before upgrading?)
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>> --
>>>>>> Christian Hammond
>>>>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>>>>> Makers of Review Board <https://www.reviewboard.org/>
>>>>>>
>>>>>> On Mon, Jul 25, 2016 at 5:10 AM, Abhishek Choudhary <xab...@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>
>>>>>>> I am trying to upgrade my ReviewBoard setup from v1.5.1 to v2.5.6.1
>>>>>>> and saw below error when I tried to install site using rb-site but
>>>>>>> connected to my old database.
>>>>>>>
>>>>>>>
>>>>>>> Do i have start afresh with database as well? Is there an easy
>>>>>>> workaround?
>>>>>>>
>>>>>>>
>>>>>>> >rb-site install --debug ~/reviewboard/site
>>>>>>>
>>>>>>> ...
>>>>>>>
>>>>>>> Creating table attachments_fileattachmenthistory
>>>>>>>
>>>>>>> Creating table attachments_fileattachment
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> [!] There was an error synchronizing the database. Make sure the
>>>>>>>
>>>>>>>     database is created and has the appropriate permissions, and then
>>>>>>>
>>>>>>>     continue.
>>>>>>>
>>>>>>> [!] Details: (1005, "Can't create table 'reviewboard.#sql-280a_6'
>>>>>>>
>>>>>>>     (errno: 150)")
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Press Enter to continue
>>>>>>>
>>>>>>> Creating tables ...
>>>>>>>
>>>>>>> Creating table diffviewer_filediffdata
>>>>>>>
>>>>>>> Creating table diffviewer_rawfilediffdata
>>>>>>>
>>>>>>> Creating table hostingsvcs_hostingserviceaccount
>>>>>>>
>>>>>>> Creating table notifications_webhooktarget_repositories
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> [!] There was an error synchronizing the database. Make sure the
>>>>>>>
>>>>>>>     database is created and has the appropriate permissions, and then
>>>>>>>
>>>>>>>     continue.
>>>>>>>
>>>>>>> [!] Details: (1005, "Can't create table 'reviewboard.#sql-280a_6'
>>>>>>>
>>>>>>>     (errno: 150)")
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Press Enter to continue
>>>>>>>
>>>>>>> Creating tables ...
>>>>>>>
>>>>>>> Creating table notifications_webhooktarget
>>>>>>>
>>>>>>> Creating table reviews_fileattachmentcomment
>>>>>>>
>>>>>>> Creating table site_localsite_users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> [!] There was an error synchronizing the database. Make sure the
>>>>>>>
>>>>>>>     database is created and has the appropriate permissions, and then
>>>>>>>
>>>>>>>     continue.
>>>>>>>
>>>>>>> [!] Details: (1005, "Can't create table 'reviewboard.#sql-280a_6'
>>>>>>>
>>>>>>>     (errno: 150)")
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Press Enter to continue
>>>>>>>
>>>>>>> Creating tables ...
>>>>>>>
>>>>>>> Creating table site_localsite_admins
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> [!] There was an error synchronizing the database. Make sure the
>>>>>>>
>>>>>>>     database is created and has the appropriate permissions, and then
>>>>>>>
>>>>>>>     continue.
>>>>>>>
>>>>>>> [!] Details: (1005, "Can't create table 'reviewboard.#sql-280a_6'
>>>>>>>
>>>>>>>     (errno: 150)")
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Press Enter to continue
>>>>>>>
>>>>>>> Creating tables ...
>>>>>>>
>>>>>>> Creating table site_localsite
>>>>>>>
>>>>>>> Creating table webapi_webapitoken
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> [!] There was an error synchronizing the database. Make sure the
>>>>>>>
>>>>>>>     database is created and has the appropriate permissions, and then
>>>>>>>
>>>>>>>     continue.
>>>>>>>
>>>>>>> [!] Details: (1005, "Can't create table 'reviewboard.#sql-280a_6'
>>>>>>>
>>>>>>>     (errno: 150)")
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Press Enter to continue
>>>>>>>
>>>>>>> Creating tables ...
>>>>>>>
>>>>>>> Upgrading Review Board from 1.5.1 to 2.5.6.1
>>>>>>>
>>>>>>> There are unapplied evolutions for auth.
>>>>>>>
>>>>>>> There are unapplied evolutions for contenttypes.
>>>>>>>
>>>>>>> There are unapplied evolutions for accounts.
>>>>>>>
>>>>>>> There are unapplied evolutions for attachments.
>>>>>>>
>>>>>>> There are unapplied evolutions for changedescs.
>>>>>>>
>>>>>>> There are unapplied evolutions for diffviewer.
>>>>>>>
>>>>>>> There are unapplied evolutions for hostingsvcs.
>>>>>>>
>>>>>>> There are unapplied evolutions for notifications.
>>>>>>>
>>>>>>> There are unapplied evolutions for reviews.
>>>>>>>
>>>>>>> There are unapplied evolutions for scmtools.
>>>>>>>
>>>>>>> There are unapplied evolutions for site.
>>>>>>>
>>>>>>> There are unapplied evolutions for webapi.
>>>>>>>
>>>>>>> Adding baseline version for new models
>>>>>>>
>>>>>>> Evolutions in attachments baseline: file_attachment_orig_filename,
>>>>>>> file_attachment_file_max_length_512, file_attachment_repo_info,
>>>>>>> file_attachment_repo_path_no_index,
>>>>>>> file_attachment_repo_revision_max_length_64, file_attachment_revision
>>>>>>>
>>>>>>> Evolutions in hostingsvcs baseline: account_hosting_url,
>>>>>>> account_hosting_url_max_length_255, account_unique_together_baseline
>>>>>>>
>>>>>>> Evolutions in site baseline: localsite_public
>>>>>>>
>>>>>>> Evolutions in webapi baseline: webapitoken_jsonfield_null
>>>>>>>
>>>>>>> Evolutions in notifications baseline: webhooktarget_extra_state,
>>>>>>> webhooktarget_extra_data_null
>>>>>>>
>>>>>>> Project signature has changed - an evolution is required
>>>>>>>
>>>>>>> Installing custom SQL ...
>>>>>>>
>>>>>>> Installing indexes ...
>>>>>>>
>>>>>>> Installed 0 object(s) from 0 fixture(s)
>>>>>>>
>>>>>>> Registering new SCM Tool Plastic SCM
>>>>>>> (reviewboard.scmtools.plastic.PlasticTool) in database
>>>>>>>
>>>>>>> OK
>>>>>>>
>>>>>>> ERROR:root:Unexpected error: u'FileDiffData'
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Abhi
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> 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 "reviewboard" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to reviewboard...@googlegroups.com.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>> --
>>>> --
>>>> Christian Hammond
>>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>>> Makers of Review Board <https://www.reviewboard.org/>
>>>>
>>>>
>>>
>>> --
>>> --
>>> Christian Hammond
>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>> Makers of Review Board <https://www.reviewboard.org/>
>>>
>>>
>
> --
> --
> 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 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to