From 6b4617970f2c25ac852daab873f5374d611d5b7e Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@madoka.volgo-balt.ru>
Date: Wed, 31 Jul 2013 10:30:14 +0400
Subject: add text_languagedetect to guess article language for better
 hyphenation (bump schema)

---
 schema/ttrss_schema_pgsql.sql | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index 9d0337a07..faa1ac1a0 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -144,6 +144,7 @@ create table ttrss_entries (id serial not null primary key,
 	num_comments integer not null default 0,
 	comments varchar(250) not null default '',
 	plugin_data text,
+	lang varchar(2),
 	author varchar(250) not null default '');
 
 create index ttrss_entries_guid_index on ttrss_entries(guid);
@@ -259,7 +260,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
 
 create table ttrss_version (schema_version int not null);
 
-insert into ttrss_version values (121);
+insert into ttrss_version values (122);
 
 create table ttrss_enclosures (id serial not null primary key,
 	content_url text not null,
-- 
cgit v1.2.3-54-g00ecf


From e596b5a9dd39b9abdfc2220fca6eda54948da593 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@fakecake.org>
Date: Tue, 17 Sep 2013 14:34:39 +0400
Subject: add update script to convert myisam tables to innodb (bump version)

---
 include/functions.php         | 2 +-
 schema/ttrss_schema_mysql.sql | 2 +-
 schema/ttrss_schema_pgsql.sql | 2 +-
 schema/versions/mysql/123.sql | 9 +++++++++
 schema/versions/pgsql/123.sql | 5 +++++
 5 files changed, 17 insertions(+), 3 deletions(-)
 create mode 100644 schema/versions/mysql/123.sql
 create mode 100644 schema/versions/pgsql/123.sql

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/include/functions.php b/include/functions.php
index 55896b66a..3b1873256 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1,6 +1,6 @@
 <?php
 	define('EXPECTED_CONFIG_VERSION', 26);
-	define('SCHEMA_VERSION', 122);
+	define('SCHEMA_VERSION', 123);
 
 	define('LABEL_BASE_INDEX', -1024);
 	define('PLUGIN_FEED_BASE_INDEX', -128);
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index 243dad8cc..aae0abf20 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -302,7 +302,7 @@ create table ttrss_tags (id integer primary key auto_increment,
 
 create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
-insert into ttrss_version values (122);
+insert into ttrss_version values (123);
 
 create table ttrss_enclosures (id integer primary key auto_increment,
 	content_url text not null,
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index faa1ac1a0..82c03f20f 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -260,7 +260,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
 
 create table ttrss_version (schema_version int not null);
 
-insert into ttrss_version values (122);
+insert into ttrss_version values (123);
 
 create table ttrss_enclosures (id serial not null primary key,
 	content_url text not null,
diff --git a/schema/versions/mysql/123.sql b/schema/versions/mysql/123.sql
new file mode 100644
index 000000000..f311d060b
--- /dev/null
+++ b/schema/versions/mysql/123.sql
@@ -0,0 +1,9 @@
+begin;
+
+ALTER TABLE ttrss_counters_cache ENGINE=InnoDB DEFAULT CHARSET=UTF8;
+ALTER TABLE ttrss_cat_counters_cache ENGINE=InnoDB DEFAULT CHARSET=UTF8;
+ALTER TABLE ttrss_feedbrowser_cache ENGINE=InnoDB DEFAULT CHARSET=UTF8;
+
+update ttrss_version set schema_version = 123;
+
+commit;
diff --git a/schema/versions/pgsql/123.sql b/schema/versions/pgsql/123.sql
new file mode 100644
index 000000000..999d48bf7
--- /dev/null
+++ b/schema/versions/pgsql/123.sql
@@ -0,0 +1,5 @@
+begin;
+
+update ttrss_version set schema_version = 123;
+
+commit;
-- 
cgit v1.2.3-54-g00ecf


From 3b19a53acf9e2ec70f9e0498fc55134798ffde8f Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <noreply@fakecake.org>
Date: Sun, 9 Mar 2014 10:49:36 +0400
Subject: schema: add resetpass_token (bump schema)

---
 include/functions.php         | 2 +-
 schema/ttrss_schema_mysql.sql | 3 ++-
 schema/ttrss_schema_pgsql.sql | 3 ++-
 schema/versions/mysql/124.sql | 8 ++++++++
 schema/versions/pgsql/124.sql | 8 ++++++++
 5 files changed, 21 insertions(+), 3 deletions(-)
 create mode 100644 schema/versions/mysql/124.sql
 create mode 100644 schema/versions/pgsql/124.sql

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/include/functions.php b/include/functions.php
index deddf358f..f03b24327 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1,6 +1,6 @@
 <?php
 	define('EXPECTED_CONFIG_VERSION', 26);
-	define('SCHEMA_VERSION', 123);
+	define('SCHEMA_VERSION', 124);
 
 	define('LABEL_BASE_INDEX', -1024);
 	define('PLUGIN_FEED_BASE_INDEX', -128);
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index aae0abf20..46f690501 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -53,6 +53,7 @@ create table ttrss_users (id integer primary key not null auto_increment,
 	created datetime default null,
 	twitter_oauth longtext default null,
 	otp_enabled boolean not null default false,
+	resetpass_token varchar(250) default null,
 	index (theme_id)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
 insert into ttrss_users (login,pwd_hash,access_level) values ('admin',
@@ -302,7 +303,7 @@ create table ttrss_tags (id integer primary key auto_increment,
 
 create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
-insert into ttrss_version values (123);
+insert into ttrss_version values (124);
 
 create table ttrss_enclosures (id integer primary key auto_increment,
 	content_url text not null,
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index 82c03f20f..f0ac4cb81 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -49,6 +49,7 @@ create table ttrss_users (id serial not null primary key,
 	salt varchar(250) not null default '',
 	twitter_oauth text default null,
 	otp_enabled boolean not null default false,
+	resetpass_token varchar(250) default null,
 	created timestamp default null);
 
 insert into ttrss_users (login,pwd_hash,access_level) values ('admin',
@@ -260,7 +261,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
 
 create table ttrss_version (schema_version int not null);
 
-insert into ttrss_version values (123);
+insert into ttrss_version values (124);
 
 create table ttrss_enclosures (id serial not null primary key,
 	content_url text not null,
diff --git a/schema/versions/mysql/124.sql b/schema/versions/mysql/124.sql
new file mode 100644
index 000000000..b49372c31
--- /dev/null
+++ b/schema/versions/mysql/124.sql
@@ -0,0 +1,8 @@
+begin;
+
+alter table ttrss_users add column resetpass_token boolean;
+alter table ttrss_users alter column resetpass_token set default null;
+
+update ttrss_version set schema_version = 124;
+
+commit;
diff --git a/schema/versions/pgsql/124.sql b/schema/versions/pgsql/124.sql
new file mode 100644
index 000000000..96ae46341
--- /dev/null
+++ b/schema/versions/pgsql/124.sql
@@ -0,0 +1,8 @@
+begin;
+
+alter table ttrss_users add column resetpass_token varchar(250);
+alter table ttrss_users alter column resetpass_token set default null;
+
+update ttrss_version set schema_version = 124;
+
+commit;
-- 
cgit v1.2.3-54-g00ecf


From 8067dc8ca5e75a7283456b8f76c006216cc37a1d Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <noreply@fakecake.org>
Date: Sun, 6 Apr 2014 13:40:16 +0000
Subject: bump schema version to fix resetpass_token created as a wrong type in
 124

---
 include/functions.php         |  2 +-
 schema/ttrss_schema_mysql.sql |  2 +-
 schema/ttrss_schema_pgsql.sql |  2 +-
 schema/versions/mysql/125.sql | 10 ++++++++++
 schema/versions/pgsql/125.sql |  5 +++++
 5 files changed, 18 insertions(+), 3 deletions(-)
 create mode 100644 schema/versions/mysql/125.sql
 create mode 100644 schema/versions/pgsql/125.sql

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/include/functions.php b/include/functions.php
index 1390d8185..2455bb801 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1,6 +1,6 @@
 <?php
 	define('EXPECTED_CONFIG_VERSION', 26);
-	define('SCHEMA_VERSION', 124);
+	define('SCHEMA_VERSION', 125);
 
 	define('LABEL_BASE_INDEX', -1024);
 	define('PLUGIN_FEED_BASE_INDEX', -128);
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index b38cb8f02..e11b71106 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -302,7 +302,7 @@ create table ttrss_tags (id integer primary key auto_increment,
 
 create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
-insert into ttrss_version values (124);
+insert into ttrss_version values (125);
 
 create table ttrss_enclosures (id integer primary key auto_increment,
 	content_url text not null,
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index f0ac4cb81..3aa65e8b2 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -261,7 +261,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
 
 create table ttrss_version (schema_version int not null);
 
-insert into ttrss_version values (124);
+insert into ttrss_version values (125);
 
 create table ttrss_enclosures (id serial not null primary key,
 	content_url text not null,
diff --git a/schema/versions/mysql/125.sql b/schema/versions/mysql/125.sql
new file mode 100644
index 000000000..9f004d963
--- /dev/null
+++ b/schema/versions/mysql/125.sql
@@ -0,0 +1,10 @@
+begin;
+
+alter table ttrss_users drop column resetpass_token;
+
+alter table ttrss_users add column resetpass_token varchar(250);
+alter table ttrss_users alter column resetpass_token set default null;
+
+update ttrss_version set schema_version = 125;
+
+commit;
diff --git a/schema/versions/pgsql/125.sql b/schema/versions/pgsql/125.sql
new file mode 100644
index 000000000..e56e0299a
--- /dev/null
+++ b/schema/versions/pgsql/125.sql
@@ -0,0 +1,5 @@
+begin;
+
+update ttrss_version set schema_version = 125;
+
+commit;
-- 
cgit v1.2.3-54-g00ecf


From 06c4c9ebaec3187d5e74693d932814e8d991daba Mon Sep 17 00:00:00 2001
From: Felix Eckhofer <felix@eckhofer.com>
Date: Tue, 15 Jul 2014 14:53:11 +0200
Subject: Update schema for size support of enclosures

---
 include/functions.php         | 2 +-
 schema/ttrss_schema_mysql.sql | 4 +++-
 schema/ttrss_schema_pgsql.sql | 4 +++-
 schema/versions/mysql/126.sql | 8 ++++++++
 schema/versions/pgsql/126.sql | 8 ++++++++
 5 files changed, 23 insertions(+), 3 deletions(-)
 create mode 100644 schema/versions/mysql/126.sql
 create mode 100644 schema/versions/pgsql/126.sql

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/include/functions.php b/include/functions.php
index b5d52ccb2..cb91b637e 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1,6 +1,6 @@
 <?php
 	define('EXPECTED_CONFIG_VERSION', 26);
-	define('SCHEMA_VERSION', 125);
+	define('SCHEMA_VERSION', 126);
 
 	define('LABEL_BASE_INDEX', -1024);
 	define('PLUGIN_FEED_BASE_INDEX', -128);
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index f8ff944c0..a9a358220 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -301,7 +301,7 @@ create table ttrss_tags (id integer primary key auto_increment,
 
 create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
-insert into ttrss_version values (125);
+insert into ttrss_version values (126);
 
 create table ttrss_enclosures (id integer primary key auto_increment,
 	content_url text not null,
@@ -309,6 +309,8 @@ create table ttrss_enclosures (id integer primary key auto_increment,
 	post_id integer not null,
 	title text not null,
 	duration text not null,
+	width integer not null default 0,
+	height integer not null default 0,
 	index (post_id),
 	foreign key (post_id) references ttrss_entries(id) ON DELETE cascade) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index 3aa65e8b2..c09f044fb 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -261,13 +261,15 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
 
 create table ttrss_version (schema_version int not null);
 
-insert into ttrss_version values (125);
+insert into ttrss_version values (126);
 
 create table ttrss_enclosures (id serial not null primary key,
 	content_url text not null,
 	content_type varchar(250) not null,
 	title text not null,
 	duration text not null,
+	width integer not null default 0,
+	height integer not null default 0,
 	post_id integer references ttrss_entries(id) ON DELETE cascade NOT NULL);
 
 create index ttrss_enclosures_post_id_idx on ttrss_enclosures(post_id);
diff --git a/schema/versions/mysql/126.sql b/schema/versions/mysql/126.sql
new file mode 100644
index 000000000..6ff661e71
--- /dev/null
+++ b/schema/versions/mysql/126.sql
@@ -0,0 +1,8 @@
+begin;
+
+alter table ttrss_enclosures add column width integer not null default 0;
+alter table ttrss_enclosures add column height integer not null default 0;
+
+update ttrss_version set schema_version = 126;
+
+commit;
diff --git a/schema/versions/pgsql/126.sql b/schema/versions/pgsql/126.sql
new file mode 100644
index 000000000..46f391aa5
--- /dev/null
+++ b/schema/versions/pgsql/126.sql
@@ -0,0 +1,8 @@
+begin;
+
+alter table ttrss_enclosures add column height integer not null default 0;
+alter table ttrss_enclosures add column width integer not null default 0;
+
+update ttrss_version set schema_version = 126;
+
+commit;
-- 
cgit v1.2.3-54-g00ecf

