require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 18);
- define('SCHEMA_VERSION', 52);
+ define('SCHEMA_VERSION', 53);
if (!file_exists("config.php")) {
print __("<b>Fatal Error</b>: You forgot to copy
create table ttrss_version (schema_version int not null) TYPE=InnoDB;
-insert into ttrss_version values (52);
+insert into ttrss_version values (53);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
create table ttrss_labels2 (id integer not null primary key auto_increment,
owner_uid integer not null,
caption varchar(250) not null,
+ fg_color varchar(15) not null default '',
+ bg_color varchar(15) not null default '',
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE
) TYPE=InnoDB;
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (52);
+insert into ttrss_version values (53);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
create table ttrss_labels2 (id serial not null primary key,
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
+ fg_color varchar(15) not null default '',
+ bg_color varchar(15) not null default '',
caption varchar(250) not null
);
--- /dev/null
+alter table ttrss_labels2 add column fg_color varchar(15);
+update ttrss_labels2 set fg_color = '';
+alter table ttrss_labels2 change fg_color fg_color varchar(15) not null;
+alter table ttrss_labels2 change fg_color fg_color varchar(15) not default '';
+
+alter table ttrss_labels2 add column bg_color varchar(15);
+update ttrss_labels2 set bg_color = '';
+alter table ttrss_labels2 change bg_color bg_color varchar(15) not null;
+alter table ttrss_labels2 change fg_color bg_color varchar(15) not default '';
+
+update ttrss_version set schema_version = 53;
--- /dev/null
+begin;
+
+alter table ttrss_labels2 add column fg_color varchar(15);
+update ttrss_labels2 set fg_color = '';
+alter table ttrss_labels2 alter column fg_color set not null;
+alter table ttrss_labels2 alter column fg_color set default '';
+
+alter table ttrss_labels2 add column bg_color varchar(15);
+update ttrss_labels2 set bg_color = '';
+alter table ttrss_labels2 alter column bg_color set not null;
+alter table ttrss_labels2 alter column bg_color set default '';
+
+update ttrss_version set schema_version = 53;
+
+commit;