Closed Bug 427936 Opened 16 years ago Closed 16 years ago

update sanitycheck.cgi to include missing foreign keys cross checks

Categories

(Bugzilla :: Bugzilla-General, enhancement)

3.1.3
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: nelhawar, Assigned: nelhawar)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20070209 Fedora/1.5.0.9-3.fc6 Firefox/1.5.0.9 pango-text
Build Identifier: 

the foreign keys cross checks in sanitycheck.cgi are missing some checks for newly added FKs to the Bugzilla/DB/Schema.pm , we need to include those checks.

Reproducible: Always
this bug depends on other bugs that update Bugzilla/DB/Schema.pm with the missing FKs
Attachment #314506 - Flags: review?(mkanat)
No, the FKs don't need to be enforced by sanitycheck.cgi once they're in the Schema. That's the whole point of having real FKs. In fact, anything that has an FK in the Schema should be *removed* from sanitycheck.cgi.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Attachment #314506 - Flags: review?(mkanat)
(In reply to comment #2)
> No, the FKs don't need to be enforced by sanitycheck.cgi once they're in the
> Schema. That's the whole point of having real FKs. In fact, anything that has
> an FK in the Schema should be *removed* from sanitycheck.cgi.
> 

I understand that the FKs in Bugzilla/DB/Schema.pm will enforce the fks on newly inserted data into the database but how about if the database have already bad values that were there before creating the FKs in Bugzilla/DB/Schema.pm ? shouldn't sanitycheck.cgi show those values?
(In reply to comment #3)
> I understand that the FKs in Bugzilla/DB/Schema.pm will enforce the fks on
> newly inserted data into the database but how about if the database have
> already bad values that were there before creating the FKs in
> Bugzilla/DB/Schema.pm ? shouldn't sanitycheck.cgi show those values?

  The database (and checksetup) forbids the creation of the FK if there are invalid values in the relationship.
Okay, talking about it with Noura, I think these would be good for 3.2, so that people can know there's something wrong with their DB *before* they go into checksetup and do an upgrade.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Whiteboard: [3.2 only--not for 4.0]
Target Milestone: --- → Bugzilla 3.2
Assignee: general → nelhawar
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
That also means that none of the blockers are actually blockers.
Status: NEW → ASSIGNED
No longer depends on: 313273, 313985, 314009, 314024, 414779, 427445
removed the depends on comments. a
Attachment #314506 - Attachment is obsolete: true
Attachment #314521 - Flags: review?(mkanat)
Comment on attachment 314521 [details] [diff] [review]
v2 patch to add missing FK cross checks to sanitycheck.cgi

LpSolit knows more about sanitycheck than me.
Attachment #314521 - Flags: review?(mkanat) → review?(LpSolit)
Comment on attachment 314521 [details] [diff] [review]
v2 patch to add missing FK cross checks to sanitycheck.cgi

>+           ["flagtypes", "grant_group_id"],
>+           ["flagtypes", "request_group_id"]);

Nit: we may pass "id" as 3rd argument so that the flagtype ID is also displayed, but many other places do not do it. So r=LpSolit with or without this additional 3rd argument.
Attachment #314521 - Flags: review?(LpSolit) → review+
CrossCheck() will go away in 4.0 when all FK are in place. But for now, they all stay.
Flags: approval+
Whiteboard: [3.2 only--not for 4.0]
Version: unspecified → 3.1.3
Checking in sanitycheck.cgi;
/cvsroot/mozilla/webtools/bugzilla/sanitycheck.cgi,v  <--  sanitycheck.cgi
new revision: 1.140; previous revision: 1.139
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: