From: Andrew Dolgov Date: Thu, 18 Sep 2008 05:02:43 +0000 (+0100) Subject: alter ttrss_labels.sql_exp to text, bump schema (closes #221) X-Git-Tag: 1.2.27~3 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f7f939b29c44fbc13e567c855bcb2a35e1083030;p=tt-rss.git alter ttrss_labels.sql_exp to text, bump schema (closes #221) --- diff --git a/sanity_check.php b/sanity_check.php index 82605fd6..5d2f391d 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -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 __("Fatal Error: You forgot to copy diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index f8c919e5..9b3ce697 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -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, diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 8801b695..dd419891 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -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, diff --git a/schema/versions/mysql/43.sql b/schema/versions/mysql/43.sql new file mode 100644 index 00000000..f1344b20 --- /dev/null +++ b/schema/versions/mysql/43.sql @@ -0,0 +1,3 @@ +alter table ttrss_labels change sql_exp sql_exp text not null; + +update ttrss_version set schema_version = 43; diff --git a/schema/versions/pgsql/43.sql b/schema/versions/pgsql/43.sql new file mode 100644 index 00000000..52bc365c --- /dev/null +++ b/schema/versions/pgsql/43.sql @@ -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;