Subversion Repositories taios

Rev

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

Rev Author Line No. Line
169 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,
21
    ParentID INT,
22
    AuthorID INT,
23
    Title TEXT,
24
    Content TEXT,
25
    DatePosted DATETIME,
26
    Category TEXT,
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,
191 tom 38
    DownloadURL TEXT,
169 tom 39
    WebsiteURL TEXT,
40
    LatestVersion TEXT,
191 tom 41
    LastUpdate DATETIME
169 tom 42
    PRIMARY KEY(ID)
43
);
44
 
45
CREATE TABLE ForumCategories
46
(
47
    ID INT NOT NULL AUTO_INCREMENT,
48
    ParentID INT,
49
    Title TEXT,
50
    Description TEXT,
51
    PRIMARY KEY(ID)
52
);
53
 
54
CREATE TABLE ForumTopics
55
(
56
    ID INT NOT NULL AUTO_INCREMENT,
57
    AuthorID INT,
58
    CategoryID INT,
59
    Title TEXT,
60
    DatePosted DATETIME,
61
    PRIMARY KEY(ID)
62
);
63
 
64
CREATE TABLE ForumPosts
65
(
66
    ID INT NOT NULL AUTO_INCREMENT,
67
    AuthorID INT,
68
    TopicID INT,
69
    Title TEXT,
70
    Content TEXT,
71
    DatePosted DATETIME,
72
    Spam BOOLEAN,
73
    PRIMARY KEY(ID)
74
);
75
 
76
INSERT INTO Users VALUES (1, 0, "admin", SHA1("password"), "admins@tim32.org", "Tim32 Admin", 0);
77
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);
191 tom 78
INSERT INTO Projects VALUES (1, 1, "TAIOS", "TAIOS (The All In One System) is a PHP based system to make the Tim32 website very self contained and altogether.", "http://websvn.kde.org/*checkout*/trunk/kdesupport/oxygen-icons/64x64/categories/applications-internet.png", "", "http://tim32.org/~tom/taios/", "SVN", NOW());