summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
Diffstat (limited to 'schema')
-rw-r--r--schema/ttrss_schema_mysql.sql2
-rw-r--r--schema/ttrss_schema_pgsql.sql5
-rw-r--r--schema/versions/mysql/35.sql1
-rw-r--r--schema/versions/pgsql/35.sql3
4 files changed, 9 insertions, 2 deletions
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index 9edb4b12c..f2daa69fb 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -205,7 +205,7 @@ create table ttrss_tags (id integer primary key auto_increment,
create table ttrss_version (schema_version int not null) TYPE=InnoDB;
-insert into ttrss_version values (34);
+insert into ttrss_version values (35);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index 7ea72cd75..c35781a69 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -18,6 +18,7 @@ drop table ttrss_feed_categories;
drop table ttrss_users;
drop table ttrss_themes;
drop table ttrss_sessions;
+drop function SUBSTRING_FOR_DATE(timestamp, int, int);
begin;
@@ -184,7 +185,7 @@ create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid);
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (34);
+insert into ttrss_version values (35);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
@@ -317,4 +318,6 @@ create table ttrss_sessions (id varchar(250) unique not null primary key,
create index ttrss_sessions_expire_index on ttrss_sessions(expire);
+create function SUBSTRING_FOR_DATE(timestamp, int, int) RETURNS text AS 'SELECT SUBSTRING(CAST($1 AS text), $2, $3)' LANGUAGE 'sql';
+
commit;
diff --git a/schema/versions/mysql/35.sql b/schema/versions/mysql/35.sql
new file mode 100644
index 000000000..ad112a021
--- /dev/null
+++ b/schema/versions/mysql/35.sql
@@ -0,0 +1 @@
+update ttrss_version set schema_version = 35;
diff --git a/schema/versions/pgsql/35.sql b/schema/versions/pgsql/35.sql
new file mode 100644
index 000000000..e624d66b3
--- /dev/null
+++ b/schema/versions/pgsql/35.sql
@@ -0,0 +1,3 @@
+create function SUBSTRING_FOR_DATE(timestamp, int, int) RETURNS text AS 'SELECT SUBSTRING(CAST($1 AS text), $2, $3)' LANGUAGE 'sql';
+
+update ttrss_version set schema_version = 35;