Subversion Repositories taios

Rev

Rev 192 | Rev 507 | 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,
192 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
 
245 tom 54
CREATE TABLE ForumPosts
169 tom 55
(
56
    ID INT NOT NULL AUTO_INCREMENT,
57
    AuthorID INT,
58
    CategoryID INT,
245 tom 59
    ParentID INT,
169 tom 60
    Title TEXT,
61
    Content TEXT,
62
    DatePosted DATETIME,
63
    Spam BOOLEAN,
64
    PRIMARY KEY(ID)
65
);
66
 
67
INSERT INTO Users VALUES (1, 0, "admin", SHA1("password"), "admins@tim32.org", "Tim32 Admin", 0);
68
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 69
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());
245 tom 70
INSERT INTO ForumCategories VALUES (1, -1, "Tim32", "Talk about Tim32 in here");
71
INSERT INTO ForumCategories VALUES (2, 1, "TAIOS", "Talk about TAIOS in here");
72
INSERT INTO ForumPosts VALUES (1, 1, 2, -1, "TAIOS Almost Finished", "As I speak we are currently in the process of finilising TAIOS so it works perfectly! I'm pleased to accounce that TAIOS should be ready within the next week or so! :D", NOW(), FALSE);