Open
Bug 287314
Opened 20 years ago
Updated 11 years ago
Move bugs.rep_platform to use an integer instead of a varchar
Categories
(Bugzilla :: Database, enhancement)
Tracking
()
NEW
People
(Reporter: mkanat, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(1 file, 3 obsolete files)
6.01 KB,
patch
|
Details | Diff | Splinter Review |
I think that this one will be the easiest to start with.
Updated•17 years ago
|
Assignee: general → kevin.benton
Comment 2•17 years ago
|
||
I am unable to work this bug at this time due to other priorities. Reassigning to default assignee.
Assignee: kevin.benton → general
Comment 3•16 years ago
|
||
Will it work for an upgrade from an enum directly to a rep_platform with ids, without the in between varchar step?
Attachment #380392 -
Flags: review?(mkanat)
Reporter | ||
Updated•16 years ago
|
Attachment #380392 -
Flags: review?(mkanat) → review-
Reporter | ||
Comment 4•16 years ago
|
||
Comment on attachment 380392 [details] [diff] [review]
updated Install::DB and DB::Schema
Instead of removing lines from Install::DB, you should wrap them in a bz_column_info call that checks the type of the field and only does the change if necessary at that point in time.
Also, you can just do a selectcol_arrayref with a {Cols=>[1,2]} argument instead of doing that "prepare, execute, fetch" thing, and then put it into a hash.
Also, don't insert $dbh->quoted strings right into SQL!! Use placeholders!
Comment 5•16 years ago
|
||
How do I check for ENUM type? Will this work?
$dbh->bz_column_info('bugs', 'rep_platform')->{TYPE} eq "ENUM"
Comment 6•16 years ago
|
||
Attachment #380392 -
Attachment is obsolete: true
Attachment #380593 -
Flags: review?(mkanat)
Reporter | ||
Updated•16 years ago
|
Attachment #380593 -
Flags: review?(mkanat) → review-
Reporter | ||
Comment 7•16 years ago
|
||
Comment on attachment 380593 [details] [diff] [review]
Using selectcol_arrayref and placeholders
Those aren't ENUM types there. That's not where the ENUM change happens, and you never, ever have to worry about any field ever being an ENUM, in Install::DB.
Comment 8•15 years ago
|
||
Attachment #380593 -
Attachment is obsolete: true
Attachment #408598 -
Flags: review?(mkanat)
![]() |
||
Comment 9•15 years ago
|
||
Shouldn't Search.pm be fixed too?
Reporter | ||
Comment 10•15 years ago
|
||
Comment on attachment 408598 [details] [diff] [review]
Removed ENUM
There's a huge amount of other code that needs to be fixed in addition to this. All of Bugzilla needs to search and view the value in addition to just fixing the DB.
Also, the migration code is incorrect. You changed the field to an integer (thus destroying all data in it) before you fixed it. You need to fix the values first and then convert it to an integer.
Attachment #408598 -
Flags: review?(mkanat) → review-
Comment 11•15 years ago
|
||
I'm making changes for bug_severity, op_sys, priority and rep_platform together because many functions like get_legal_field_values in Bugzilla::Field are common to all of them. I am also able to create a new bug with these changes.
Please review and let me know if I'm on the right track here.
Attachment #408598 -
Attachment is obsolete: true
Attachment #408816 -
Flags: review?(mkanat)
![]() |
||
Comment 12•14 years ago
|
||
Comment on attachment 408816 [details] [diff] [review]
updating all bug_fields and create bug
This looks good, but this patch alone is pretty useless as nothing can be tested. The rest of the code still needs to be fixed.
Attachment #408816 -
Flags: review?(mkanat)
![]() |
||
Updated•11 years ago
|
Component: Bugzilla-General → Database
![]() |
||
Updated•11 years ago
|
Assignee: general → database
You need to log in
before you can comment on or make changes to this bug.
Description
•