schema: add ttrss_labels2 color fields (bump schema)
This commit is contained in:
parent
56ff756447
commit
aec57d7ad4
|
@ -2,7 +2,7 @@
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
define('EXPECTED_CONFIG_VERSION', 18);
|
define('EXPECTED_CONFIG_VERSION', 18);
|
||||||
define('SCHEMA_VERSION', 52);
|
define('SCHEMA_VERSION', 53);
|
||||||
|
|
||||||
if (!file_exists("config.php")) {
|
if (!file_exists("config.php")) {
|
||||||
print __("<b>Fatal Error</b>: You forgot to copy
|
print __("<b>Fatal Error</b>: You forgot to copy
|
||||||
|
|
|
@ -224,7 +224,7 @@ create table ttrss_tags (id integer primary key auto_increment,
|
||||||
|
|
||||||
create table ttrss_version (schema_version int not null) TYPE=InnoDB;
|
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,
|
create table ttrss_enclosures (id serial not null primary key,
|
||||||
content_url text not null,
|
content_url text not null,
|
||||||
|
@ -385,6 +385,8 @@ create table ttrss_feedbrowser_cache (
|
||||||
create table ttrss_labels2 (id integer not null primary key auto_increment,
|
create table ttrss_labels2 (id integer not null primary key auto_increment,
|
||||||
owner_uid integer not null,
|
owner_uid integer not null,
|
||||||
caption varchar(250) 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
|
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE
|
||||||
) TYPE=InnoDB;
|
) TYPE=InnoDB;
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid);
|
||||||
|
|
||||||
create table ttrss_version (schema_version int not null);
|
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,
|
create table ttrss_enclosures (id serial not null primary key,
|
||||||
content_url text not null,
|
content_url text not null,
|
||||||
|
@ -353,6 +353,8 @@ create table ttrss_feedbrowser_cache (
|
||||||
|
|
||||||
create table ttrss_labels2 (id serial not null primary key,
|
create table ttrss_labels2 (id serial not null primary key,
|
||||||
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
|
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
|
caption varchar(250) not null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
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;
|
|
@ -0,0 +1,15 @@
|
||||||
|
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;
|
Loading…
Reference in New Issue