Closed Bug 825584 Opened 12 years ago Closed 12 years ago

"Building Schema object from database" do not include foreign keys

Categories

(Bugzilla :: Installation & Upgrading, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 377432

People

(Reporter: andershol, Unassigned)

Details

Attachments

(1 file)

Bugzilla may try to build the schema object from the database (e.g. if you delete the row from the bz_schema-table). But when it does, it does not check for any foreign keys, so when it next tries to upgrade the schema it will try to create the foreign keys that already exist and this will fail.

This patch adds logic to get foreign key definitions from the database (Bugzilla/DB/Mysql.pm, Bugzilla/DB/Schema.pm), handles missing columns (Bugzilla/DB.pm), and fix the error handling to check for missing column before attempting dclone-ing it (Bugzilla/DB/Schema.pm).
Attachment #696705 - Attachment is patch: true
We already have a bug for this issue. Please read comments in bug 377432 and re-attach your patch there.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: