My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* LightPost Tables descriptions
* Created October 11, 2006
* by Chris Scott, chris.scott.one@gmail.com
*/

/*
* Drop tables if they exist
*/
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS bookmarks;
DROP TABLE IF EXISTS comments;
DROP TABLE IF EXISTS entries;
DROP TABLE IF EXISTS categories;

/*
* Users Table
*/

CREATE TABLE users (
userID INT NOT NULL AUTO_INCREMENT,
fname VARCHAR(30) NOT NULL,
lname VARCHAR(30) NOT NULL,
email VARCHAR(100) NOT NULL,
username VARCHAR(20) NOT NULL,
password VARCHAR(20) NOT NULL,
role varchar(50) NOT NULL,
CONSTRAINT users_userID_pk PRIMARY KEY (userID),
INDEX users_login_IX (username, password)
) TYPE=INNODB
;

INSERT INTO users (fname, lname, email, username, password, role)
VALUES ('Chris','Scott','chris.scott.one@gmail.com','chris','asstro','admin');

/*
* Categories, Entries, Comments, Bookmarks
*/

CREATE TABLE categories (
categoryID INT NOT NULL AUTO_INCREMENT,
category VARCHAR(255) NOT NULL,
CONSTRAINT categories_categoryID_pk PRIMARY KEY (categoryID)
) TYPE=INNODB
;

CREATE TABLE entries (
entryID INT NOT NULL AUTO_INCREMENT,
userID INT NOT NULL,
categoryID INT NOT NULL,
title VARCHAR(255) NULL,
body TEXT NOT NULL,
dateCreated DATETIME NOT NULL,
dateLastUpdated DATETIME NOT NULL,
CONSTRAINT entries_entryID_pk PRIMARY KEY (entryID),
CONSTRAINT entries_userID_fk FOREIGN KEY (userID) REFERENCES users (userID),
INDEX entries_categoryID_ix (categoryID)
) TYPE=INNODB
;

CREATE TABLE comments (
commentID INT NOT NULL AUTO_INCREMENT,
entryID INT NOT NULL,
comment TEXT NOT NULL,
name VARCHAR(80) NOT NULL,
email VARCHAR(100) NULL,
url VARCHAR(150) NULL,
dateCreated DATETIME NOT NULL,
CONSTRAINT comments_commentID_pk PRIMARY KEY (commentID),
INDEX comments_entryID_ix (entryID),
CONSTRAINT comments_entryD_pk FOREIGN KEY (entryID) REFERENCES entries (entryID)
) TYPE=INNODB
;

CREATE TABLE bookmarks (
bookmarkID INT NOT NULL AUTO_INCREMENT,
name VARCHAR(80) NOT NULL,
url VARCHAR(255) NOT NULL,
CONSTRAINT bookmarks_bookmarkID_pk PRIMARY KEY (bookmarkID)
) TYPE=INNODB
;

Change log

r116 by Chris.Scott.One on Oct 22, 2006   Diff
Encorperated the rest of the new ui with
the admin buttons and the new forms. Also
added categoryForm
Go to: 
Project members, sign in to write a code review

Older revisions

r68 by mpwoodward on Oct 20, 2006   Diff
[No log message]
r7 by Chris.Scott.One on Oct 16, 2006   Diff
Added coldspring ber to the tools
directory, changed the services and mg
config file names, fixed up some names
in the mg app, added the last changes
I made to lightblog
r2 by mpwoodward on Oct 16, 2006   Diff
initial commit into the new project
area
All revisions of this file

File info

Size: 2100 bytes, 81 lines

File properties

svn:keywords
Id
Powered by Google Project Hosting