fixed syntax error in init-db.sql
This commit is contained in:
parent
2a91d71bb9
commit
c86a4b7113
|
@ -1,4 +1,5 @@
|
||||||
-- Blog posts
|
-- Blog posts
|
||||||
|
drop table if exists posts;
|
||||||
create table posts (
|
create table posts (
|
||||||
id serial,
|
id serial,
|
||||||
title varchar(128) not null,
|
title varchar(128) not null,
|
||||||
|
@ -10,13 +11,15 @@ create table posts (
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Blog comments
|
-- Blog comments
|
||||||
|
drop table if exists comments;
|
||||||
create table comments (
|
create table comments (
|
||||||
id serial,
|
id serial,
|
||||||
sender varchar(64) not null,
|
sender varchar(64) not null,
|
||||||
email varchar(64) not null,
|
email varchar(64) not null,
|
||||||
url carchar(1024),
|
url varchar(1024),
|
||||||
body text,
|
body text,
|
||||||
created timestamp(0) deafult now() not null,
|
created timestamp(0) default now() not null,
|
||||||
|
post bigint not null,
|
||||||
foreign key (post) references posts(id)
|
foreign key (post) references posts(id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue