73 lines
3.1 KiB
Text
73 lines
3.1 KiB
Text
-- Parse::SQL::Dia version 0.27
|
|
-- Documentation http://search.cpan.org/dist/Parse-Dia-SQL/
|
|
-- Environment Perl 5.018004, /usr/bin/perl
|
|
-- Architecture i386-linux-thread-multi
|
|
-- Target Database postgres
|
|
-- Input file database.dia
|
|
-- Generated at Wed Jan 21 00:43:48 2015
|
|
-- Typemap for postgres not found in input file
|
|
|
|
-- get_constraints_drop
|
|
|
|
-- get_permissions_drop
|
|
|
|
-- get_view_drop
|
|
|
|
-- get_schema_drop
|
|
drop table feed;
|
|
drop table feeditem;
|
|
drop table announcement;
|
|
drop table feedhistory;
|
|
|
|
-- get_smallpackage_pre_sql
|
|
|
|
-- get_schema_create
|
|
create table feed (
|
|
id serial PRIMARY KEY ,
|
|
slug varchar(255) NOT NULL UNIQUE ,
|
|
uri varchar(255) NOT NULL ,
|
|
auto_refresh boolean NOT NULL ,
|
|
refresh_interval integer ,
|
|
next_refresh timestamp NOT NULL ,
|
|
password varchar(255) ,
|
|
creation_ip inet NOT NULL ,
|
|
creation_date timestamp NOT NULL DEFAULT now
|
|
) ;
|
|
create table feeditem (
|
|
feed varchar(255) NOT NULL REFERENCES feed ON DELETE CASCADE ON UPDATE CASCADE ,
|
|
timestamp timestamp NOT NULL DEFAULT now ,
|
|
content text NOT NULL ,
|
|
diff text NOT NULL ,
|
|
PRIMARY KEY (feed, timestamp)
|
|
) ;
|
|
create table announcement (
|
|
id serial PRIMARY KEY ,
|
|
title varchar(255) NOT NULL ,
|
|
content text NOT NULL ,
|
|
abstract text ,
|
|
publication_date timestamp NOT NULL DEFAULT now ,
|
|
show_until timestamp ,
|
|
is_important boolean NOT NULL
|
|
) ;
|
|
create table feedhistory (
|
|
feed integer NOT NULL REFERENCES feed ON DELETE CASCADE ON UPDATE CASCADE ,
|
|
timestamp timestamp NOT NULL DEFAULT 'now' ,
|
|
ip inet NOT NULL ,
|
|
slug varchar(255) ,
|
|
uri varchar(255) ,
|
|
auto_refresh boolean ,
|
|
refresh_interval integer ,
|
|
next_refresh timestamp ,
|
|
password varchar(255) ,
|
|
PRIMARY KEY (feed, timestamp)
|
|
) ;
|
|
|
|
-- get_view_create
|
|
|
|
-- get_permissions_create
|
|
|
|
-- get_inserts
|
|
|
|
-- get_smallpackage_post_sql
|
|
|
|
-- get_associations_create
|