Labs/Joey/database

< Labs‎ | Joey
Revision as of 08:11, 14 March 2007 by Clouserw (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Joey » Database

Schema Diagram (png)

Schema SQL (txt)

Field descriptions

users

+------------------+------------------+------+-----+---------+----------------+
| Field            | Description                                              |
+------------------+------------------+------+-----+---------+----------------+
| id               |                                                          |
| username         |                                                          |
| password         |                                                          |
| email            |                                                          |
| confirmationcode | If needed to confirm email, it's used.  Otherwise, null. |
| phone            |                                                          |
| phoneoperatorid  | Used for routing web->phone information                  |
| notes            |                                                          |
| disabled         |                                                          |
| created          |                                                          |
| modified         |                                                          |
+------------------+------------------+------+-----+---------+----------------+

uploads

+----------+------------------+------+-----+---------+----------------+
| Field    | Description                                              |
+----------+------------------+------+-----+---------+----------------+
| id       |                                                          |
| user_id  |                                                          |
| name     |                                                          |
| title    |                                                          |
| referrer | The source URL that this object was uploaded from        |
| created  |                                                          |
| modified |                                                          |
+----------+------------------+------+-----+---------+----------------+

files

+-----------+------------------+------+-----+---------+----------------+
| Field     | Description
+-----------+------------------+------+-----+---------+----------------+
| id        |                                                          |
| upload_id |                                                          |
| name      | The filename on disk                                     |
| size      | The size of the file on disk                             |
| type      | The type of the file (eg. image/png)                     |
| preview   | The filename of the preview on disk (always an image/png)|
| created   |                                                          |
| modified  |                                                          |
+-----------+------------------+------+-----+---------+----------------+


contentsource

+----------------------+------------------+------+-----+---------+-------+
| Field                | Description                                     |
+----------------------+------------------+------+-----+---------+-------+
| id                   |                                                 |
| upload_id            |                                                 |
| source               | Textual representation. Can be XML, a URL, etc. |
| contentsourcetype_id |                                                 |
| created              |                                                 |
| modified             |                                                 |
+----------------------+------------------+------+-----+---------+-------+

This table gets a bonus explanation. The `source` column is basically a pointer to information elsewhere on the web. As the project grows, the types of content (specified in `contentsourcetype`) in this field can grow. The two supported types right now are microsummaries (XML) and RSS (URL).

contentsourcetype

+----------+------------------+------+-----+---------+-----+
| Field    | Description                                   |
+----------+------------------+------+-----+---------+-----+
| id       |                                               |
| name     | The type of content (eg. application/rss+xml) |
| created  |                                               |
| modified |                                               |
+----------+------------------+------+-----+---------+-----+