Subversion Repositories taios

Rev

Rev 13 | Rev 169 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 tom 1
DROP DATABASE Tim32;
2
CREATE DATABASE Tim32;
3
 
4
USE Tim32;
5
 
6
CREATE TABLE Users
7
(
8
    ID INT NOT NULL AUTO_INCREMENT,
9
    AccessID INT,
10
    Username TEXT,
11
    Password TEXT,
12
    EmailAddress TEXT,
13
    Name TEXT,
14
    ChallengeID INT,
15
    PRIMARY KEY(ID)
16
);
17
 
18
CREATE TABLE BlogPosts
19
(
20
    ID INT NOT NULL AUTO_INCREMENT,
13 tom 21
    ParentID INT,
1 tom 22
    AuthorID INT,
23
    Title TEXT,
24
    Content TEXT,
25
    DatePosted DATETIME,
26
    Category TEXT,
7 tom 27
    Spam BOOLEAN,
28
    PRIMARY KEY(ID)
29
);
30
 
31
CREATE TABLE Projects
32
(
33
    ID INT NOT NULL AUTO_INCREMENT,
34
    AuthorID INT,
35
    Title TEXT,
36
    Description TEXT,
37
    LogoURL TEXT,
38
    WebsiteURL TEXT,
39
    LatestVersion TEXT,
40
    PRIMARY KEY(ID)
41
);
42
 
43
CREATE TABLE ForumCategories
44
(
45
    ID INT NOT NULL AUTO_INCREMENT,
46
    ParentID INT,
47
    Title TEXT,
48
    Description TEXT,
49
    PRIMARY KEY(ID)
50
);
51
 
52
CREATE TABLE ForumTopics
53
(
54
    ID INT NOT NULL AUTO_INCREMENT,
55
    AuthorID INT,
56
    CategoryID INT,
57
    Title TEXT,
58
    DatePosted DATETIME,
59
    PRIMARY KEY(ID)
60
);
61
 
62
CREATE TABLE ForumPosts
63
(
64
    ID INT NOT NULL AUTO_INCREMENT,
65
    AuthorID INT,
66
    TopicID INT,
67
    Title TEXT,
68
    Content TEXT,
69
    DatePosted DATETIME,
70
    Spam BOOLEAN,
71
    PRIMARY KEY(ID)
72
);
73
 
1 tom 74
INSERT INTO Users VALUES (1, 0, "admin", SHA1("password"), "admins@tim32.org", "Tim32 Admin", 0);
14 tom 75
INSERT INTO BlogPosts VALUES(1, -1, 1, "Welcome to Tim32!", "Welcome to the new Tim32 website! It has had a complete design re-think to make it simpler and easier to use!", NOW(), "Tim32", FALSE);