diff --git a/sanity_check.php b/sanity_check.php index 47d12f98d..3dc6eaaf7 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -2,7 +2,7 @@ require_once "functions.php"; define('EXPECTED_CONFIG_VERSION', 15); - define('SCHEMA_VERSION', 33); + define('SCHEMA_VERSION', 34); if (!file_exists("config.php")) { print __("Fatal Error: You forgot to copy diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index db72c74be..9edb4b12c 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -60,7 +60,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key, owner_uid integer not null, title varchar(200) not null, cat_id integer default null, - feed_url varchar(250) not null, + feed_url text not null, icon_url varchar(250) not null default '', update_interval integer not null default 0, purge_interval integer not null default 0, @@ -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 (33); +insert into ttrss_version values (34); 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 92aa72b72..7ea72cd75 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -53,7 +53,7 @@ create table ttrss_feeds (id serial not null primary key, owner_uid integer not null references ttrss_users(id) on delete cascade, title varchar(200) not null, cat_id integer default null references ttrss_feed_categories(id) on delete set null, - feed_url varchar(250) not null, + feed_url text not null, icon_url varchar(250) not null default '', update_interval integer not null default 0, purge_interval integer not null default 0, @@ -184,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 (33); +insert into ttrss_version values (34); create table ttrss_enclosures (id serial not null primary key, content_url text not null, diff --git a/schema/versions/mysql/34.sql b/schema/versions/mysql/34.sql new file mode 100644 index 000000000..e591a7a96 --- /dev/null +++ b/schema/versions/mysql/34.sql @@ -0,0 +1,3 @@ +alter table ttrss_feeds change feed_url feed_url text not null; + +update ttrss_version set schema_version = 34; diff --git a/schema/versions/pgsql/34.sql b/schema/versions/pgsql/34.sql new file mode 100644 index 000000000..c8733d430 --- /dev/null +++ b/schema/versions/pgsql/34.sql @@ -0,0 +1,7 @@ +alter table ttrss_feeds rename column feed_url to feed_url_old; +alter table ttrss_feeds add column feed_url text; +update ttrss_feeds set feed_url = feed_url_old; +alter table ttrss_feeds alter column feed_url set not null; +alter table ttrss_feeds drop column feed_url_old; + +update ttrss_version set schema_version = 34;