schema: add ttrss_prefs.access_level, bump version

This commit is contained in:
Andrew Dolgov 2008-01-30 11:54:16 +01:00
parent 38426fb135
commit 2b6ed06b23
5 changed files with 17 additions and 3 deletions

View file

@ -2,7 +2,7 @@
require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 15);
define('SCHEMA_VERSION', 31);
define('SCHEMA_VERSION', 32);
if (!file_exists("config.php")) {
print __("<b>Fatal Error</b>: You forgot to copy

View file

@ -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;
insert into ttrss_version values (31);
insert into ttrss_version values (32);
create table ttrss_enclosures (id serial not null primary key,
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,
short_desc text not null,
help_text varchar(250) not null default '',
access_level integer not null default 0,
def_value text not null,
index(type_id),
foreign key (type_id) references ttrss_prefs_types(id),

View file

@ -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);
insert into ttrss_version values (31);
insert into ttrss_version values (32);
create table ttrss_enclosures (id serial not null primary key,
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,
short_desc text not null,
help_text text not null default '',
access_level integer not null default 0,
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);

View file

@ -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;

View file

@ -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;