require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 17);
- define('SCHEMA_VERSION', 42);
+ define('SCHEMA_VERSION', 43);
if (!file_exists("config.php")) {
print __("<b>Fatal Error</b>: You forgot to copy
create table ttrss_labels (id integer not null primary key auto_increment,
owner_uid integer not null,
- sql_exp varchar(250) not null,
+ sql_exp text not null,
description varchar(250) not null,
index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) TYPE=InnoDB;
create table ttrss_version (schema_version int not null) TYPE=InnoDB;
-insert into ttrss_version values (42);
+insert into ttrss_version values (43);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
create table ttrss_labels (id serial not null primary key,
owner_uid integer not null references ttrss_users(id) on delete cascade,
- sql_exp varchar(250) not null,
+ sql_exp text not null,
description varchar(250) not null);
create index ttrss_labels_owner_uid_index on ttrss_labels(owner_uid);
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (42);
+insert into ttrss_version values (43);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
--- /dev/null
+alter table ttrss_labels change sql_exp sql_exp text not null;
+
+update ttrss_version set schema_version = 43;
--- /dev/null
+alter table ttrss_labels rename column sql_exp to sql_exp_old;
+alter table ttrss_labels add column sql_exp text;
+update ttrss_labels set sql_exp = sql_exp_old;
+alter table ttrss_labels alter column sql_exp set not null;
+alter table ttrss_labels drop column sql_exp_old;
+
+update ttrss_version set schema_version = 43;