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)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

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
Blocks: 488517
Depends on: 410205
Blocks: 410205
No longer depends on: 410205
Assignee: nobody → mikelee
Assignee: mikelee → expatrick
Status: NEW → ASSIGNED
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)
Whiteboard: [webmocha]
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
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.
Yeah, we'll definitely need a migration script then. It can be a separate bug if you like.
Also, it looks like you renamed the audit_update_tags msgid for arabic but not for any other locales.
(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
renamed audit tags for all languages in audit_update_tags in 27590
For reference in ViewVC :) r27590
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.