From 2a91d71bb979eefe27ceee9924c28f6a13016b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agentzh=20=28=E7=AB=A0=E4=BA=A6=E6=98=A5=29?= Date: Wed, 20 Jan 2010 17:59:01 +0800 Subject: [PATCH] checked init-db.sql for the Blog demo. --- demo/Blog/misc/mysql/init-db.sql | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 demo/Blog/misc/mysql/init-db.sql diff --git a/demo/Blog/misc/mysql/init-db.sql b/demo/Blog/misc/mysql/init-db.sql new file mode 100644 index 0000000..e6364b2 --- /dev/null +++ b/demo/Blog/misc/mysql/init-db.sql @@ -0,0 +1,22 @@ +-- Blog posts +create table posts ( + id serial, + title varchar(128) not null, + content text not null, + author varchar(64) not null, + created timestamp(0) default now() not null, + comments integer default 0 not null, + primary key (id) +); + +-- Blog comments +create table comments ( + id serial, + sender varchar(64) not null, + email varchar(64) not null, + url carchar(1024), + body text, + created timestamp(0) deafult now() not null, + foreign key (post) references posts(id) +); +