summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-01-25 17:40:33 +0100
committerAndrew Dolgov <[email protected]>2008-01-25 17:40:33 +0100
commit5b8534ef6c2653f369b8e6aa993af83084d08585 (patch)
tree202993b5f842f9f07d15e0535ff5a04274b93070
parente14a59be5ac535783fd1abfbff21ec7e202972ea (diff)
schema: add ttrss_feeds.update_method, bump version
-rw-r--r--sanity_check.php2
-rw-r--r--schema/ttrss_schema_mysql.sql3
-rw-r--r--schema/ttrss_schema_pgsql.sql3
-rw-r--r--schema/versions/mysql/31.sql6
-rw-r--r--schema/versions/pgsql/31.sql6
5 files changed, 17 insertions, 3 deletions
diff --git a/sanity_check.php b/sanity_check.php
index 2dfa75a83..250505d00 100644
--- a/sanity_check.php
+++ b/sanity_check.php
@@ -2,7 +2,7 @@
require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 14);
- define('SCHEMA_VERSION', 30);
+ define('SCHEMA_VERSION', 31);
if (!file_exists("config.php")) {
print __("<b>Fatal Error</b>: You forgot to copy
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index a63a4133d..240961d03 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -78,6 +78,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
auth_pass_encrypted boolean not null default false,
last_viewed datetime default null,
last_update_started datetime default null,
+ update_method integer not null default 0,
index(owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
index(cat_id),
@@ -204,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 (30);
+insert into ttrss_version values (31);
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 942183bfc..8ffce3513 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -70,6 +70,7 @@ create table ttrss_feeds (id serial not null primary key,
cache_images boolean not null default false,
last_viewed timestamp default null,
last_update_started timestamp default null,
+ update_method integer not null default 0,
auth_pass_encrypted boolean not null default false);
create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
@@ -183,7 +184,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 (30);
+insert into ttrss_version values (31);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
diff --git a/schema/versions/mysql/31.sql b/schema/versions/mysql/31.sql
new file mode 100644
index 000000000..94cfc14d8
--- /dev/null
+++ b/schema/versions/mysql/31.sql
@@ -0,0 +1,6 @@
+alter table ttrss_feeds add column update_method integer;
+update ttrss_feeds set update_method = 0;
+alter table ttrss_feeds change update_method update_method integer not null;
+alter table ttrss_feeds alter column update_method set default 0;
+
+update ttrss_version set schema_version = 31;
diff --git a/schema/versions/pgsql/31.sql b/schema/versions/pgsql/31.sql
new file mode 100644
index 000000000..e8d6bdb4a
--- /dev/null
+++ b/schema/versions/pgsql/31.sql
@@ -0,0 +1,6 @@
+alter table ttrss_feeds add column update_method integer;
+update ttrss_feeds set update_method = 0;
+alter table ttrss_feeds alter column update_method set not null;
+alter table ttrss_feeds alter column update_method set default 0;
+
+update ttrss_version set schema_version = 31;