Closed
Bug 456126
Opened 17 years ago
Closed 17 years ago
Set up database for collections
Categories
(addons.mozilla.org Graveyard :: Collections, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
4.0.2
People
(Reporter: fligtar, Assigned: rdoherty)
References
Details
Attachments
(1 file, 1 obsolete file)
|
1.83 KB,
patch
|
morgamic
:
review+
|
Details | Diff | Splinter Review |
From the specs:
* The database tables and schema for supporting user-created collections needs to be created for use with the web service and website.
We need to plan and implement the schema, figuring out what tables and columns are going to be needed.
| Reporter | ||
Updated•17 years ago
|
Priority: -- → P1
| Reporter | ||
Updated•17 years ago
|
Target Milestone: --- → 4.0.2
Updated•17 years ago
|
Assignee: nobody → morgamic
Comment 1•17 years ago
|
||
Ryan - let's work on this together this week.
Assignee: morgamic → rdoherty
No longer blocks: 456129
| Assignee | ||
Comment 2•17 years ago
|
||
From the mockups/wireframes it looks like we need:
* Bandwagon categories table
* id
* description
* Addon <-> Bandwagon categories table
* addon_id
* bandwagon_category_id
Anything else?
| Assignee | ||
Comment 3•17 years ago
|
||
* Date added to addon <-> categories table
Comment 4•17 years ago
|
||
Some of the other tables have created and modified, not sure if that is needed here -- Justin?
| Reporter | ||
Comment 5•17 years ago
|
||
I think we'd only need the creation date for Addon <-> Bandwagon categories table.
We do need a tables for the lists themselves, though:
* Bandwagon lists table
** id
** name (l10n)
** description (l10n)
** access (open or closed)
** listed (boolean - whether listed in directory)
** password
** subscribers (int)
** created
** modified
* Addon <-> Bandwagon lists table
** addon_id
** list_id
** created
* Bandwagon lists <-> Users
** list_id
** user_id
** role
* Bandwagon lists <-> tags/categories
Lists can be in categories. We need to decide whether to make a special list categories table or make List an addontype_id and just use the normal categories table (would be easier).
| Assignee | ||
Comment 6•17 years ago
|
||
Thanks Justin for the detailed list.
Are there any possible drawbacks to making the lists an addontype_id? I'm not familiar enough with how that table is used to know if it will cause any problems.
| Assignee | ||
Comment 7•17 years ago
|
||
Here's my first run at the table structures.
Attachment #340361 -
Flags: review?(morgamic)
Comment 8•17 years ago
|
||
Comment on attachment 340361 [details] [diff] [review]
Patch for database structure
Looks okay to me, unless you want collection name to be unique, in which case you'd want to add it to the collections table primary key.
You may also want an index on `listed` if it's going to be in retrieval queries but we can always optimize after we have our queries formed in the controllers.
Updated•17 years ago
|
Attachment #340361 -
Flags: review?(morgamic) → review+
| Assignee | ||
Comment 9•17 years ago
|
||
Added the index, forgot to put in foreign key constraints.
Attachment #340361 -
Attachment is obsolete: true
Attachment #341336 -
Flags: review?(morgamic)
Comment 10•17 years ago
|
||
Comment on attachment 341336 [details] [diff] [review]
SQL with index and proper foreign key constraints
wfm
Attachment #341336 -
Flags: review?(morgamic) → review+
| Assignee | ||
Comment 11•17 years ago
|
||
Comment 12•17 years ago
|
||
I added "drop table if exists" statements to your SQL in r18999. If there was a reason they were omitted let me know and I can back it out.
Updated•17 years ago
|
Keywords: push-needed
Updated•17 years ago
|
Summary: Setup database for collections → Set up database for collections
Collections are in and seem to be working fine; verified FIXED.
Status: RESOLVED → VERIFIED
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
•