schema: add ttrss_prefs.access_level, bump version
This commit is contained in:
parent
38426fb135
commit
2b6ed06b23
|
@ -2,7 +2,7 @@
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
define('EXPECTED_CONFIG_VERSION', 15);
|
define('EXPECTED_CONFIG_VERSION', 15);
|
||||||
define('SCHEMA_VERSION', 31);
|
define('SCHEMA_VERSION', 32);
|
||||||
|
|
||||||
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
|
||||||
|
|
|
@ -205,7 +205,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 (31);
|
insert into ttrss_version values (32);
|
||||||
|
|
||||||
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,
|
||||||
|
@ -235,6 +235,7 @@ create table ttrss_prefs (pref_name varchar(250) not null primary key,
|
||||||
section_id integer not null default 1,
|
section_id integer not null default 1,
|
||||||
short_desc text not null,
|
short_desc text not null,
|
||||||
help_text varchar(250) not null default '',
|
help_text varchar(250) not null default '',
|
||||||
|
access_level integer not null default 0,
|
||||||
def_value text not null,
|
def_value text not null,
|
||||||
index(type_id),
|
index(type_id),
|
||||||
foreign key (type_id) references ttrss_prefs_types(id),
|
foreign key (type_id) references ttrss_prefs_types(id),
|
||||||
|
|
|
@ -184,7 +184,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 (31);
|
insert into ttrss_version values (32);
|
||||||
|
|
||||||
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,
|
||||||
|
@ -212,6 +212,7 @@ create table ttrss_prefs (pref_name varchar(250) not null primary key,
|
||||||
section_id integer not null references ttrss_prefs_sections(id) default 1,
|
section_id integer not null references ttrss_prefs_sections(id) default 1,
|
||||||
short_desc text not null,
|
short_desc text not null,
|
||||||
help_text text not null default '',
|
help_text text not null default '',
|
||||||
|
access_level integer not null default 0,
|
||||||
def_value text not null);
|
def_value text not null);
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_FEED_ICONS', 1, 'true', 'Enable icons in feedlist',3);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_FEED_ICONS', 1, 'true', 'Enable icons in feedlist',3);
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
alter table ttrss_prefs add column access_level integer;
|
||||||
|
update ttrss_prefs set access_level = 0;
|
||||||
|
alter table ttrss_prefs change access_level access_level integer not null;
|
||||||
|
alter table ttrss_prefs alter column access_level set default 0;
|
||||||
|
|
||||||
|
update ttrss_version set schema_version = 32;
|
|
@ -0,0 +1,6 @@
|
||||||
|
alter table ttrss_prefs add column access_level integer;
|
||||||
|
update ttrss_prefs set access_level = 0;
|
||||||
|
alter table ttrss_prefs alter column access_level set not null;
|
||||||
|
alter table ttrss_prefs alter column access_level set default 0;
|
||||||
|
|
||||||
|
update ttrss_version set schema_version = 32;
|
Loading…
Reference in New Issue