alter ttrss_labels.sql_exp to text, bump schema (closes #221)

This commit is contained in:
Andrew Dolgov 2008-09-18 06:02:43 +01:00
parent 5a437c88d7
commit f7f939b29c
5 changed files with 15 additions and 5 deletions

View File

@ -2,7 +2,7 @@
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

View File

@ -188,7 +188,7 @@ create table ttrss_filters (id integer not null primary key auto_increment,
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;
@ -210,7 +210,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 (42);
insert into ttrss_version values (43);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,

View File

@ -170,7 +170,7 @@ create table ttrss_filters (id serial not null primary key,
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);
@ -190,7 +190,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 (42);
insert into ttrss_version values (43);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,

View File

@ -0,0 +1,3 @@
alter table ttrss_labels change sql_exp sql_exp text not null;
update ttrss_version set schema_version = 43;

View File

@ -0,0 +1,7 @@
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;