Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /trunk/schema.sql [000000] .. [r176] Maximize Restore

  Switch to unified view

a b/trunk/schema.sql
1
CREATE TABLE IF NOT EXISTS Boards (
2
    id          INTEGER PRIMARY KEY, -- board id
3
    parent      INTEGER,             -- parent id, if applicable
4
    lft         INTEGER,             -- left value for nested set
5
    rgt         INTEGER,             -- right value for nested set
6
    name        VARCHAR(255),        -- name of the board
7
    description TEXT,                -- description of it
8
    img         TEXT                 -- url to image to display w/ desc.
9
);
10
11
CREATE TABLE IF NOT EXISTS Posts (
12
    id              INTEGER PRIMARY KEY, -- post id
13
    thread          INTEGER,             -- NULL if this is the first post in a
14
                                         -- thread, otherwise points to 1st
15
    parent          INTEGER,             -- for full threading, direct parent
16
    author_id       INTEGER,             -- user id of author, NULL for guest
17
    author_name     VARCHAR(255),        -- info for a guest author
18
    author_email    VARCHAR(255),        --
19
    title           VARCHAR(255),        -- title of post
20
    message         TEXT,                -- post itself
21
    time_created    NUMERIC(10,0),       -- Could be a problem at:
22
    time_modified   NUMERIC(10,0),       -- Sat, 20 Nov 2286 17:46:39 GMT
23
    flags           INTEGER              -- post flags
24
    -- Flags will have to be defined in the Perl code, we should probably have
25
    -- HAS_ATTACHMENTS - 0x01 - 0001
26
    -- HAS_POLL        - 0x02 - 0010
27
    -- NO_BBC          - 0x04 - 0100
28
    -- NO_SMILING      - 0x08 - 1000
29
    -- other things I haven't thought of yet
30
    -- I like bit fields, but is it the right answer?
31
);
32
33
CREATE TABLE IF NOT EXISTS Attachments (
34
    id          -- file id
35
    postid      -- post it is attached to
36
    filename    -- name of the file in
37
    location    -- where it's stored rel. to attachments directory
38
    filesize    -- 
39
);