From: Andrew Dolgov Date: Mon, 21 Aug 2006 06:11:36 +0000 (+0100) Subject: move out old schema upgrade files X-Git-Tag: 1.2.3~47 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=8fb018809f07f4723a9b50905be16776303851aa;p=tt-rss.git move out old schema upgrade files --- diff --git a/schema/obsolete/upgrade-1.1.7-1.2.2-mysql.sql b/schema/obsolete/upgrade-1.1.7-1.2.2-mysql.sql new file mode 100644 index 00000000..546adc2d --- /dev/null +++ b/schema/obsolete/upgrade-1.1.7-1.2.2-mysql.sql @@ -0,0 +1,29 @@ +alter table ttrss_feeds add column hidden bool; +update ttrss_feeds set hidden = false; +alter table ttrss_feeds change hidden hidden bool not null; +alter table ttrss_feeds alter column hidden set default false; + +alter table ttrss_users add column email_digest bool; +update ttrss_users set email_digest = false; +alter table ttrss_users change email_digest email_digest bool not null; +alter table ttrss_users alter column email_digest set default false; + +alter table ttrss_users add column last_digest_sent datetime; +update ttrss_users set last_digest_sent = false; +alter table ttrss_users alter column last_digest_sent set default null; + +alter table ttrss_filters add column enabled bool; +update ttrss_filters set enabled = true; +alter table ttrss_filters change enabled enabled bool not null; +alter table ttrss_filters alter column enabled set default true; + +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('MARK_UNREAD_ON_UPDATE', 1, 'false', 'Set articles as unread on update',3); + +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('REVERSE_HEADLINES', 1, 'false', 'Reverse headline order (oldest first)',2); + +update ttrss_prefs SET section_id = 3 WHERE pref_name = 'ENABLE_SEARCH_TOOLBAR'; +update ttrss_prefs SET section_id = 3 WHERE pref_name = 'ENABLE_FEED_ICONS'; +update ttrss_prefs SET section_id = 3 WHERE pref_name = 'EXTENDED_FEEDLIST'; + +update ttrss_version set schema_version = 9; + diff --git a/schema/obsolete/upgrade-1.1.7-1.2.2-pgsql.sql b/schema/obsolete/upgrade-1.1.7-1.2.2-pgsql.sql new file mode 100644 index 00000000..9624403a --- /dev/null +++ b/schema/obsolete/upgrade-1.1.7-1.2.2-pgsql.sql @@ -0,0 +1,33 @@ +begin; + +alter table ttrss_feeds add column hidden boolean; +update ttrss_feeds set hidden = false; +alter table ttrss_feeds alter column hidden set not null; +alter table ttrss_feeds alter column hidden set default false; + +alter table ttrss_users add column email_digest boolean; +update ttrss_users set email_digest = false; +alter table ttrss_users alter column email_digest set not null; +alter table ttrss_users alter column email_digest set default false; + +alter table ttrss_users add column last_digest_sent timestamp; +update ttrss_users set last_digest_sent = NULL; +alter table ttrss_users alter column last_digest_sent set default NULL; + +alter table ttrss_filters add column enabled boolean; +update ttrss_filters set enabled = true; +alter table ttrss_filters alter column enabled set not null; +alter table ttrss_filters alter column enabled set default true; + +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('MARK_UNREAD_ON_UPDATE', 1, 'false', 'Set articles as unread on update',3); + +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('REVERSE_HEADLINES', 1, 'false', 'Reverse headline order (oldest first)',2); + +update ttrss_prefs SET section_id = 3 WHERE pref_name = 'ENABLE_SEARCH_TOOLBAR'; +update ttrss_prefs SET section_id = 3 WHERE pref_name = 'ENABLE_FEED_ICONS'; +update ttrss_prefs SET section_id = 3 WHERE pref_name = 'EXTENDED_FEEDLIST'; + +update ttrss_version set schema_version = 9; + +commit; + diff --git a/schema/upgrade-1.1.7-1.2.2-mysql.sql b/schema/upgrade-1.1.7-1.2.2-mysql.sql deleted file mode 100644 index 546adc2d..00000000 --- a/schema/upgrade-1.1.7-1.2.2-mysql.sql +++ /dev/null @@ -1,29 +0,0 @@ -alter table ttrss_feeds add column hidden bool; -update ttrss_feeds set hidden = false; -alter table ttrss_feeds change hidden hidden bool not null; -alter table ttrss_feeds alter column hidden set default false; - -alter table ttrss_users add column email_digest bool; -update ttrss_users set email_digest = false; -alter table ttrss_users change email_digest email_digest bool not null; -alter table ttrss_users alter column email_digest set default false; - -alter table ttrss_users add column last_digest_sent datetime; -update ttrss_users set last_digest_sent = false; -alter table ttrss_users alter column last_digest_sent set default null; - -alter table ttrss_filters add column enabled bool; -update ttrss_filters set enabled = true; -alter table ttrss_filters change enabled enabled bool not null; -alter table ttrss_filters alter column enabled set default true; - -insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('MARK_UNREAD_ON_UPDATE', 1, 'false', 'Set articles as unread on update',3); - -insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('REVERSE_HEADLINES', 1, 'false', 'Reverse headline order (oldest first)',2); - -update ttrss_prefs SET section_id = 3 WHERE pref_name = 'ENABLE_SEARCH_TOOLBAR'; -update ttrss_prefs SET section_id = 3 WHERE pref_name = 'ENABLE_FEED_ICONS'; -update ttrss_prefs SET section_id = 3 WHERE pref_name = 'EXTENDED_FEEDLIST'; - -update ttrss_version set schema_version = 9; - diff --git a/schema/upgrade-1.1.7-1.2.2-pgsql.sql b/schema/upgrade-1.1.7-1.2.2-pgsql.sql deleted file mode 100644 index 9624403a..00000000 --- a/schema/upgrade-1.1.7-1.2.2-pgsql.sql +++ /dev/null @@ -1,33 +0,0 @@ -begin; - -alter table ttrss_feeds add column hidden boolean; -update ttrss_feeds set hidden = false; -alter table ttrss_feeds alter column hidden set not null; -alter table ttrss_feeds alter column hidden set default false; - -alter table ttrss_users add column email_digest boolean; -update ttrss_users set email_digest = false; -alter table ttrss_users alter column email_digest set not null; -alter table ttrss_users alter column email_digest set default false; - -alter table ttrss_users add column last_digest_sent timestamp; -update ttrss_users set last_digest_sent = NULL; -alter table ttrss_users alter column last_digest_sent set default NULL; - -alter table ttrss_filters add column enabled boolean; -update ttrss_filters set enabled = true; -alter table ttrss_filters alter column enabled set not null; -alter table ttrss_filters alter column enabled set default true; - -insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('MARK_UNREAD_ON_UPDATE', 1, 'false', 'Set articles as unread on update',3); - -insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('REVERSE_HEADLINES', 1, 'false', 'Reverse headline order (oldest first)',2); - -update ttrss_prefs SET section_id = 3 WHERE pref_name = 'ENABLE_SEARCH_TOOLBAR'; -update ttrss_prefs SET section_id = 3 WHERE pref_name = 'ENABLE_FEED_ICONS'; -update ttrss_prefs SET section_id = 3 WHERE pref_name = 'EXTENDED_FEEDLIST'; - -update ttrss_version set schema_version = 9; - -commit; -