summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-07 18:14:48 +0300
committerAndrew Dolgov <[email protected]>2010-11-07 18:14:48 +0300
commit324944f3329b99e527f12c65e4a0e1358e8f180a (patch)
tree37b098fa9a066e3dbb0d74584a571fabb749e092 /schema
parentf3f67c1b53d2d93486fc3c57253b8af4d5e7a0c7 (diff)
implement per-user timezone support; store dates in UTC internally (closes #254)
Diffstat (limited to 'schema')
-rw-r--r--schema/ttrss_schema_mysql.sql4
-rw-r--r--schema/ttrss_schema_pgsql.sql4
-rw-r--r--schema/versions/mysql/68.sql7
-rw-r--r--schema/versions/pgsql/68.sql7
4 files changed, 20 insertions, 2 deletions
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index fbac36007..b6ac57fc4 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -241,7 +241,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 (67);
+insert into ttrss_version values (68);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
@@ -400,6 +400,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_THEME_ID', 2, '0', '', 1);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('USER_TIMEZONE', 2, 'UTC', 'User timezone', 1);
+
create table ttrss_user_prefs (
owner_uid integer not null,
pref_name varchar(250),
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index f4589c769..64d00dda7 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -213,7 +213,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 (67);
+insert into ttrss_version values (68);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
@@ -364,6 +364,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_THEME_ID', 2, '0', '', 1);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('USER_TIMEZONE', 2, 'UTC', 'User timezone', 1);
+
create table ttrss_user_prefs (
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
pref_name varchar(250) not null references ttrss_prefs(pref_name) ON DELETE CASCADE,
diff --git a/schema/versions/mysql/68.sql b/schema/versions/mysql/68.sql
new file mode 100644
index 000000000..6d56df0f9
--- /dev/null
+++ b/schema/versions/mysql/68.sql
@@ -0,0 +1,7 @@
+begin;
+
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('USER_TIMEZONE', 2, 'UTC', 'User timezone', 1);
+
+update ttrss_version set schema_version = 68;
+
+commit;
diff --git a/schema/versions/pgsql/68.sql b/schema/versions/pgsql/68.sql
new file mode 100644
index 000000000..6d56df0f9
--- /dev/null
+++ b/schema/versions/pgsql/68.sql
@@ -0,0 +1,7 @@
+begin;
+
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('USER_TIMEZONE', 2, 'UTC', 'User timezone', 1);
+
+update ttrss_version set schema_version = 68;
+
+commit;