Subversion Repositories taios

Rev

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