summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-11-17 11:16:24 +0100
committerAndrew Dolgov <[email protected]>2007-11-17 11:16:24 +0100
commit963d33141c30ce4663410eb48d66fa50d8e56701 (patch)
treeda3439b5c85f3236fc9ff31524de8e8702ec086a /schema
parentefae7595c4bbb47c4f86e9b142120bb3e5bc887e (diff)
schema: add support for enclosures
Diffstat (limited to 'schema')
-rw-r--r--schema/ttrss_schema_mysql.sql8
-rw-r--r--schema/ttrss_schema_pgsql.sql6
-rw-r--r--schema/versions/mysql/26.sql7
-rw-r--r--schema/versions/pgsql/26.sql7
4 files changed, 28 insertions, 0 deletions
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index 970afb06e..d3792b9e4 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -11,6 +11,7 @@ drop table if exists ttrss_prefs;
drop table if exists ttrss_prefs_types;
drop table if exists ttrss_prefs_sections;
drop table if exists ttrss_tags;
+drop table if exists ttrss_enclosures;
drop table if exists ttrss_entry_comments;
drop table if exists ttrss_user_entries;
drop table if exists ttrss_entries;
@@ -203,6 +204,13 @@ create table ttrss_version (schema_version int not null) TYPE=InnoDB;
insert into ttrss_version values (26);
+create table ttrss_enclosures (id serial not null primary key,
+ content_url text not null,
+ content_type varchar(250) not null,
+ post_id integer not null,
+ index (post_id),
+ foreign key (post_id) references ttrss_entries(id) ON DELETE cascade);
+
create table ttrss_prefs_types (id integer not null primary key,
type_name varchar(100) not null) TYPE=InnoDB;
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index fabf3716e..bf6397f2d 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -8,6 +8,7 @@ drop table ttrss_prefs;
drop table ttrss_prefs_types;
drop table ttrss_prefs_sections;
drop table ttrss_tags;
+drop table ttrss_enclosures;
drop table ttrss_entry_comments;
drop table ttrss_user_entries;
drop table ttrss_entries;
@@ -182,6 +183,11 @@ create table ttrss_version (schema_version int not null);
insert into ttrss_version values (26);
+create table ttrss_enclosures (id serial not null primary key,
+ content_url text not null,
+ content_type varchar(250) not null,
+ post_id integer references ttrss_entries(id) ON DELETE cascade NOT NULL);
+
create table ttrss_prefs_types (id integer not null primary key,
type_name varchar(100) not null);
diff --git a/schema/versions/mysql/26.sql b/schema/versions/mysql/26.sql
index 513be9a6e..5ca7aeb86 100644
--- a/schema/versions/mysql/26.sql
+++ b/schema/versions/mysql/26.sql
@@ -3,4 +3,11 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
alter table ttrss_users add column created datetime;
alter table ttrss_users alter column created set default null;
+create table ttrss_enclosures (id serial not null primary key,
+ content_url text not null,
+ content_type varchar(250) not null,
+ post_id integer not null,
+ index (post_id),
+ foreign key (post_id) references ttrss_entries(id) ON DELETE cascade);
+
update ttrss_version set schema_version = 26;
diff --git a/schema/versions/pgsql/26.sql b/schema/versions/pgsql/26.sql
index 48b966190..b597c2940 100644
--- a/schema/versions/pgsql/26.sql
+++ b/schema/versions/pgsql/26.sql
@@ -3,4 +3,11 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
alter table ttrss_users add column created timestamp;
alter table ttrss_users alter column created set default null;
+create table ttrss_enclosures (id serial not null primary key,
+ content_url text not null,
+ content_type varchar(250) not null,
+ post_id integer not null,
+ index (post_id),
+ foreign key (post_id) references ttrss_entries(id) ON DELETE cascade);
+
update ttrss_version set schema_version = 26;