Subversion Repositories taios

Rev

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

DROP DATABASE Tim32;
CREATE DATABASE Tim32;

USE Tim32;

CREATE TABLE Users
(
    ID INT NOT NULL AUTO_INCREMENT,
    AccessID INT,
    Username TEXT,
    Password TEXT,
    EmailAddress TEXT,
    Name TEXT,
    ChallengeID INT,
    PRIMARY KEY(ID)
);

CREATE TABLE BlogPosts
(
    ID INT NOT NULL AUTO_INCREMENT,
    ParentID INT,
    AuthorID INT,
    Title TEXT,
    Content TEXT,
    DatePosted DATETIME,
    Category TEXT,
    Spam BOOLEAN,
    PRIMARY KEY(ID)
);

CREATE TABLE Projects
(
    ID INT NOT NULL AUTO_INCREMENT,
    AuthorID INT,
    Title TEXT,
    Description TEXT,
    LogoURL TEXT,
    DownloadURL TEXT,
    WebsiteURL TEXT,
    LatestVersion TEXT,
    LastUpdate DATETIME,
    PRIMARY KEY(ID)
);

CREATE TABLE ForumCategories
(
    ID INT NOT NULL AUTO_INCREMENT,
    ParentID INT,
    Title TEXT,
    Description TEXT,
    PRIMARY KEY(ID)
);

CREATE TABLE ForumPosts
(
    ID INT NOT NULL AUTO_INCREMENT,
    AuthorID INT,
    CategoryID INT,
    ParentID INT,
    Title TEXT,
    Content TEXT,
    DatePosted DATETIME,
    Spam BOOLEAN,
    PRIMARY KEY(ID)
);

INSERT INTO Users VALUES (1, 0, "admin", SHA1("password"), "admins@tim32.org", "Tim32 Admin", 0);
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);
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());
INSERT INTO ForumCategories VALUES (1, -1, "Tim32", "Talk about Tim32 in here");
INSERT INTO ForumCategories VALUES (2, 1, "TAIOS", "Talk about TAIOS in here");
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);