fix schema for favicon_avg_color
This commit is contained in:
parent
2cfbb448fb
commit
14118af36f
4 changed files with 11 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
define('EXPECTED_CONFIG_VERSION', 26);
|
||||
define('SCHEMA_VERSION', 116);
|
||||
define('SCHEMA_VERSION', 117);
|
||||
|
||||
define('LABEL_BASE_INDEX', -1024);
|
||||
define('PLUGIN_FEED_BASE_INDEX', -128);
|
||||
|
@ -511,13 +511,13 @@
|
|||
return $icon_file;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function calculate_avg_color($iconFile) {
|
||||
|
||||
|
||||
require_once "lib/floIcon.php";
|
||||
|
||||
|
||||
$imgInfo = @getimagesize($iconFile);
|
||||
|
||||
|
||||
if(strtolower($imgInfo['mime'])=='image/vnd.microsoft.icon') {
|
||||
$ico = new floIcon();
|
||||
@$ico->readICO($iconFile);
|
||||
|
|
|
@ -108,6 +108,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
|
|||
purge_interval integer not null default 0,
|
||||
last_updated datetime default 0,
|
||||
last_error varchar(250) not null default '',
|
||||
favicon_avg_color varchar(11) default null,
|
||||
site_url varchar(250) not null default '',
|
||||
auth_login varchar(250) not null default '',
|
||||
auth_pass varchar(250) not null default '',
|
||||
|
@ -298,7 +299,7 @@ create table ttrss_tags (id integer primary key auto_increment,
|
|||
|
||||
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
|
||||
|
||||
insert into ttrss_version values (116);
|
||||
insert into ttrss_version values (117);
|
||||
|
||||
create table ttrss_enclosures (id integer primary key auto_increment,
|
||||
content_url text not null,
|
||||
|
|
|
@ -70,6 +70,7 @@ create table ttrss_feeds (id serial not null primary key,
|
|||
purge_interval integer not null default 0,
|
||||
last_updated timestamp default null,
|
||||
last_error text not null default '',
|
||||
favicon_avg_color varchar(11) default null,
|
||||
site_url varchar(250) not null default '',
|
||||
auth_login varchar(250) not null default '',
|
||||
parent_feed integer default null references ttrss_feeds(id) on delete set null,
|
||||
|
@ -256,7 +257,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
|
|||
|
||||
create table ttrss_version (schema_version int not null);
|
||||
|
||||
insert into ttrss_version values (116);
|
||||
insert into ttrss_version values (117);
|
||||
|
||||
create table ttrss_enclosures (id serial not null primary key,
|
||||
content_url text not null,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
begin;
|
||||
|
||||
ALTER TABLE `ttrss_feeds` ADD favicon_avg_color VARCHAR(11)
|
||||
ALTER TABLE ttrss_feeds ADD COLUMN favicon_avg_color VARCHAR(11);
|
||||
alter table ttrss_feeds alter column favicon_avg_color set default null;
|
||||
|
||||
update ttrss_version set schema_version = 117;
|
||||
|
||||
|
|
Loading…
Reference in a new issue