checked init-db.sql for the Blog demo.

This commit is contained in:
agentzh (章亦春) 2010-01-20 17:59:01 +08:00
parent 1e4232e406
commit 2a91d71bb9
1 changed files with 22 additions and 0 deletions

View File

@ -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)
);