Closed
Bug 488516
Opened 16 years ago
Closed 16 years ago
Rename tags to categories in the database and code :(
Categories
(addons.mozilla.org Graveyard :: Public Pages, defect)
addons.mozilla.org Graveyard
Public Pages
Tracking
(Not tracked)
RESOLVED
FIXED
5.0.7
People
(Reporter: clouserw, Assigned: expatrick)
References
Details
(Whiteboard: [webmocha])
Years ago morgamic and I were standing in his garage drawing on the wall[1]. At the time tags were taking over the net and we had a short conversation along the lines of:
"Categories are for chumps. Let's use tags instead."
"Alright, I'll add a table for tags."
Unfortunately, somewhere between now and then[2] our tags turned into categories but didn't tell the database schema or any of the code. In order to support our new tagging spec[3] we have to oust the masquerading categories. This bug is for:
- Rename "tags" to "categories" in the database schema, all the tests, and all the code.
- Create a script to convert the current schema to the new schema
[1] http://www.flickr.com/photos/morgamic/205515439/
[2] I was going to put a revision here but this was pre-SVN and I don't want to look at CVS.
[3] http://docs.google.com/Doc?docid=dds6vwb4_1dxwx5vg3&hl=en
Reporter | ||
Updated•16 years ago
|
Reporter | ||
Updated•16 years ago
|
Assignee: nobody → mikelee
Assignee | ||
Updated•16 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•16 years ago
|
||
I have this done locally; need to change any associated tests once get the test framework running, and check in, once we get a branch and SVN accounts. (I'll check out our branch and patch it)
Updated•16 years ago
|
Whiteboard: [webmocha]
Assignee | ||
Comment 2•16 years ago
|
||
Committed to webmocha branch in r27388. Requires re-import of database. Alter table sequence didn't work for me because renaming columns with foreign key constraints is broken in mysql (http://bugs.mysql.com/bug.php?id=14347). Need to find a resolution to this when we go to production.
Here are the changes:
rename table tags to categories;
rename table addons_tags to addons_categories;
alter table addons_categories change tag_id category_id int(11) unsigned;
rename table collections_tags to collections_categories;
alter table collections_categories change tag_id category_id int(11) unsigned;
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 3•16 years ago
|
||
Is it possible to drop the constraints, rename the columns, and add the constraints with the new column names?
BTW, you can create a file config-local.php next to config.php and `define('DEBUG', 2);` in there.
Reporter | ||
Comment 4•16 years ago
|
||
Yeah, we'll definitely need a migration script then. It can be a separate bug if you like.
Reporter | ||
Comment 5•16 years ago
|
||
Also, it looks like you renamed the audit_update_tags msgid for arabic but not for any other locales.
Assignee | ||
Comment 6•16 years ago
|
||
(In reply to comment #4)
> Yeah, we'll definitely need a migration script then. It can be a separate bug
> if you like.
Yes, I'll create a separate bug
Assignee | ||
Comment 7•16 years ago
|
||
renamed audit tags for all languages in audit_update_tags in 27590
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•