Guten Tag Munijosh,
am Dienstag, 21. Mai 2019 um 00:08 schrieben Sie:
> Is there way to force Bz_schema to recreate with new database/tables information ?
No and it wouldn't make much sense anyway: Bugzilla can't work with an
arbitrary changed database schema, that's the whole point of keeping
track of changes itself does on the schema at runtime.
Just think of it: Bugzilla's code might assume that some colums are
NULLable and others are not and someone changes both at the database
level. What does it help that Bugzilla knows that because of a
regenerated schema? The code simply doesn't work that way and will
fail at some point.
> Please suggest some alternative.
First of all install a fresh new Bugzilla 5.0.6 without using your old
database and see if that works. If it does, it's another hint that
your current schema is broken for some reason. If it doesn't work as
well, my former educated guess might have been wrong and there's a
problem somewhere else in your concrete setup, maybe even a bug in
Bugzilla nobody came across yet.
But if it works, that's another hint that your current schema is broken
for some reason. If you don't want to debug your existing schema
further, the only thing I can think of is migrating your existing bugs
by exporting/importing to the newly installed Bugzilla and deal with
things like missing custom fields etc. as needed. If you recreate
everything using the official UI, you shouldn't be running into
inconsistent schema anymore in theory.
https://bugzilla.readthedocs.io/en/5.0/using/finding.html#bug-lists
https://www.bugzilla.org/docs/4.4/en/html/api/importxml.html
https://www.bugzilla.org/docs/4.4/en/html/api/contrib/bzdbcopy.html
If I was you, I would prefer XML, because that seems to be the best
seperation between your two schemas. The only downside AFAIK is that
things like attachments are only exported to XML if XML-generation is
invoked per bug instead of for a search result. The reason is that in
case of a search result "excludefield=attachmentdata" is forwarded by
the UI, which is not the case for individual bugs.
So, you have different options: Invoke the URL per individual bug or a
group of bugs at the shell like in the following example:
>
http://bugzilla.example.org/show_bug.cgi?ctype=xml&id=243
>
http://bugzilla.example.org/show_bug.cgi?ctype=xml&id=243&id=...&id=...
Or do the same per individual bug using the link "XML" in the bottom
right of each bug or use searches and the button "XML" in the bottom
left of the search results. Only in the last case attachments are not
provvidfed by default, if you want those as well, you need to use the
developer tools of your browser to change the containing form and
remove the hidden input "excludefield".
You need to test what works best for you, depending on the number of
bugs, how large the attachments are and stuff.