Rev 7 | Rev 14 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | 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 | AuthorID INT, |
||
22 | Title TEXT, |
||
23 | Content TEXT, |
||
24 | DatePosted DATETIME, |
||
25 | Category TEXT, |
||
26 | PRIMARY KEY(ID) |
||
27 | ); |
||
28 | |||
7 | tom | 29 | CREATE TABLE BlogComments |
30 | ( |
||
31 | ID INT NOT NULL AUTO_INCREMENT, |
||
10 | tom | 32 | ParentID INT, |
7 | tom | 33 | AuthorID INT, |
34 | PostID INT, |
||
35 | Title TEXT, |
||
36 | Content TEXT, |
||
37 | DatePosted DATETIME, |
||
38 | Spam BOOLEAN, |
||
39 | PRIMARY KEY(ID) |
||
40 | ); |
||
41 | |||
42 | CREATE TABLE Projects |
||
43 | ( |
||
44 | ID INT NOT NULL AUTO_INCREMENT, |
||
45 | AuthorID INT, |
||
46 | Title TEXT, |
||
47 | Description TEXT, |
||
48 | LogoURL TEXT, |
||
49 | WebsiteURL TEXT, |
||
50 | LatestVersion TEXT, |
||
51 | PRIMARY KEY(ID) |
||
52 | ); |
||
53 | |||
54 | CREATE TABLE ForumCategories |
||
55 | ( |
||
56 | ID INT NOT NULL AUTO_INCREMENT, |
||
57 | ParentID INT, |
||
58 | Title TEXT, |
||
59 | Description TEXT, |
||
60 | PRIMARY KEY(ID) |
||
61 | ); |
||
62 | |||
63 | CREATE TABLE ForumTopics |
||
64 | ( |
||
65 | ID INT NOT NULL AUTO_INCREMENT, |
||
66 | AuthorID INT, |
||
67 | CategoryID INT, |
||
68 | Title TEXT, |
||
69 | DatePosted DATETIME, |
||
70 | PRIMARY KEY(ID) |
||
71 | ); |
||
72 | |||
73 | CREATE TABLE ForumPosts |
||
74 | ( |
||
75 | ID INT NOT NULL AUTO_INCREMENT, |
||
76 | AuthorID INT, |
||
77 | TopicID INT, |
||
78 | Title TEXT, |
||
79 | Content TEXT, |
||
80 | DatePosted DATETIME, |
||
81 | Spam BOOLEAN, |
||
82 | PRIMARY KEY(ID) |
||
83 | ); |
||
84 | |||
1 | tom | 85 | INSERT INTO Users VALUES (1, 0, "admin", SHA1("password"), "admins@tim32.org", "Tim32 Admin", 0); |
86 | INSERT INTO BlogPosts VALUES(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"); |