Closed Bug 247547 Opened 20 years ago Closed 20 years ago

'series_categories' uses an auto-increment column, 'category_id', which produces a sequence with too long a name

Categories

(Bugzilla :: Installation & Upgrading, defect)

2.17.7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: jdubrule, Assigned: gerv)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040404 Firefox/0.8
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040404 Firefox/0.8

When checksetup.pl creates series_categories, with auto-incrementing column
'category_id'.

In Postgres and Oracle, a sequence is created (implicitly in Postgres, explicity
in Oracle) to store the next serial number.

However, the sequence name would be 'series_categories_category_id_seq'. which
exceeds Oracle's maximum column name length.


Reproducible: Always
Steps to Reproduce:
Run checksetup.pl or:

create sequence series_categories_category_id_seq;

Actual Results:  
create sequence series_categories_category_id_seq
                *
ERROR at line 1:
ORA-00972: identifier is too long


Expected Results:  
Sequence created.
I'd suggest changing the column name to simply be 'id', which results in: 

    series_categories_id_seq

which is under the limit.
Is there a way to explicitly override the name of the series which is created?
Blocks: bz-oracle
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.20
Version: unspecified → 2.17.7
Whats hte maximum size for a sequence? Its been a while since I've used orcale.

You could chagne the name, but then the calling code would have the special case
this.
The maximum length is 30 characters.

I'd suggest we change the name from 'category_id' to 'id', and be done.  It only
gets used a couple of places in the code.
This one's probably mine. Sure, we can change the name. It's a bit annoying
because it's inconsistent, but I can live with that.

Gerv
Assignee: zach → gerv
we use 'id' by itself in lots of other tables.
normally I would say schema changes are scary on a branch, but I'll OK this 
(and the other one) for 2.18 provided they go in as part of your charting
megapatch, since they are both related to chart schema. :)
Flags: blocking2.18+
Target Milestone: Bugzilla 2.20 → Bugzilla 2.18
Fixed by checkin for bug 225687.

Gerv
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.