P4DTI issue job000356

TitleUpgrading Bugzilla integration causes replications to fail
Assigned userNick Barnes
DescriptionIf you upgrade your Bugzilla integration, updates to bugs in Bugzilla are no longer replicated. Also, the consistency checker will complain about all the issues.
AnalysisThe change_schema() method in bugzilla.py says:

    def change_schema(self, old_version, new_version):
        # "Old P4DTI/Bugzilla schema version %s detected;
        # dropping old tables and replacing with version %s."
        self.log(118, (old_version, new_version))

This loses the replicator's record of which bug is replicated to which job, also fixes and filespecs. So later replications from Bugzilla to Perforce will fail.
So, we should use ALTER TABLE rather than dropping and re-creating.
Need to know what alterations to make, so we need to know how the schema has changed according to schema version. This should be in the relevant design document.
How foundmanual_test
EvidenceFound during pre-release testing of 1.1.2.
Introduced in1.1.2
Created byGareth Rees
Created on2001-07-16 13:49:22
Last modified byGareth Rees
Last modified on2001-12-10 19:50:10
History2001-07-16 GDR Created.


Change Effect Date User Description
14176 closed 2001-07-16 16:27:27 Nick Barnes Old schema versions get upgraded. Made schema_version a string (so we can have schema_version='' if we need it). Delete config entries from the p4dti_config table if necessary.
14171 open 2001-07-16 15:02:42 Nick Barnes Added section describing schema changes. Brought schema description up to date (action field was dropped from p4dti_bugs).