summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/weblog-database.sql
blob: 7fbb7d7704038ab03f9adffb3075e7b5fa11c326 (plain)
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
SET TIME ZONE 0;
CREATE TABLE entries (
	id integer PRIMARY KEY ,
	edate text NOT NULL ,
	cdate timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP ,
	mdate timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP ,
	lang text ,
	title text ,
	title_xml xml ,
	content xml NOT NULL ,
	sha1 text NOT NULL ,
	special_name text ,
	has_cut boolean NOT NULL DEFAULT FALSE
) ;
CREATE INDEX entries_edate_key ON entries ( edate ) ;
CREATE TABLE incat (
	id integer NOT NULL ,
	code text NOT NULL ,
	FOREIGN KEY ( id ) REFERENCES entries ( id ) ON DELETE CASCADE
) ;
CREATE INDEX incat_id_key ON incat ( id ) ;
CREATE INDEX incat_code_key ON incat ( code ) ;

-- Reminder:
-- GRANT SELECT ON entries , incat TO "www-data" ;