From 43398b8e436a01b921562609a08336fc53f71b79 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 13 Mar 2008 09:18:21 +0100 Subject: [PATCH] remove limit on ttrss_feeds.feed_url length (closes #199) --- sanity_check.php | 2 +- schema/ttrss_schema_mysql.sql | 4 ++-- schema/ttrss_schema_pgsql.sql | 4 ++-- schema/versions/mysql/34.sql | 3 +++ schema/versions/pgsql/34.sql | 7 +++++++ 5 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 schema/versions/mysql/34.sql create mode 100644 schema/versions/pgsql/34.sql diff --git a/sanity_check.php b/sanity_check.php index 47d12f98..3dc6eaaf 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 db72c74b..9edb4b12 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 92aa72b7..7ea72cd7 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 00000000..e591a7a9 --- /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 00000000..c8733d43 --- /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; -- 2.39.5