Subversion Repositories taios

Rev

Rev 245 | 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,
500 freddie 14
    Salt TEXT,
169 tom 15
    ChallengeID INT,
16
    PRIMARY KEY(ID)
17
);
18
 
19
CREATE TABLE BlogPosts
20
(
21
    ID INT NOT NULL AUTO_INCREMENT,
22
    ParentID INT,
23
    AuthorID INT,
24
    Title TEXT,
25
    Content TEXT,
26
    DatePosted DATETIME,
27
    Category TEXT,
28
    Spam BOOLEAN,
29
    PRIMARY KEY(ID)
30
);
31
 
32
CREATE TABLE Projects
33
(
34
    ID INT NOT NULL AUTO_INCREMENT,
35
    AuthorID INT,
36
    Title TEXT,
37
    Description TEXT,
38
    LogoURL TEXT,
191 tom 39
    DownloadURL TEXT,
169 tom 40
    WebsiteURL TEXT,
41
    LatestVersion TEXT,
192 tom 42
    LastUpdate DATETIME,
169 tom 43
    PRIMARY KEY(ID)
44
);
45
 
46
CREATE TABLE ForumCategories
47
(
48
    ID INT NOT NULL AUTO_INCREMENT,
49
    ParentID INT,
50
    Title TEXT,
51
    Description TEXT,
52
    PRIMARY KEY(ID)
53
);
54
 
245 tom 55
CREATE TABLE ForumPosts
169 tom 56
(
57
    ID INT NOT NULL AUTO_INCREMENT,
58
    AuthorID INT,
59
    CategoryID INT,
245 tom 60
    ParentID INT,
169 tom 61
    Title TEXT,
62
    Content TEXT,
63
    DatePosted DATETIME,
64
    Spam BOOLEAN,
65
    PRIMARY KEY(ID)
66
);
67
 
68
INSERT INTO Users VALUES (1, 0, "admin", SHA1("password"), "admins@tim32.org", "Tim32 Admin", 0);
69
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 70
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 71
INSERT INTO ForumCategories VALUES (1, -1, "Tim32", "Talk about Tim32 in here");
72
INSERT INTO ForumCategories VALUES (2, 1, "TAIOS", "Talk about TAIOS in here");
73
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);