<?php
define('EXPECTED_CONFIG_VERSION', 26);
- define('SCHEMA_VERSION', 125);
+ define('SCHEMA_VERSION', 126);
define('LABEL_BASE_INDEX', -1024);
define('PLUGIN_FEED_BASE_INDEX', -128);
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
-insert into ttrss_version values (125);
+insert into ttrss_version values (126);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
post_id integer not null,
title text not null,
duration text not null,
+ width integer not null default 0,
+ height integer not null default 0,
index (post_id),
foreign key (post_id) references ttrss_entries(id) ON DELETE cascade) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (125);
+insert into ttrss_version values (126);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
content_type varchar(250) not null,
title text not null,
duration text not null,
+ width integer not null default 0,
+ height integer not null default 0,
post_id integer references ttrss_entries(id) ON DELETE cascade NOT NULL);
create index ttrss_enclosures_post_id_idx on ttrss_enclosures(post_id);
--- /dev/null
+begin;
+
+alter table ttrss_enclosures add column width integer not null default 0;
+alter table ttrss_enclosures add column height integer not null default 0;
+
+update ttrss_version set schema_version = 126;
+
+commit;
--- /dev/null
+begin;
+
+alter table ttrss_enclosures add column height integer not null default 0;
+alter table ttrss_enclosures add column width integer not null default 0;
+
+update ttrss_version set schema_version = 126;
+
+commit;