summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-04-25 21:34:32 +0000
committerDries Buytaert <dries@buytaert.net>2007-04-25 21:34:32 +0000
commitdbfcd7d13716a5ad10ad454ca2e22339008c1fd2 (patch)
tree5b0f966b6357e8ed830adf8fe21bc06d46536b05 /modules/system/system.install
parent9a142acc8dcbf690e146d0c146128d8cf8443b47 (diff)
downloadbrdo-dbfcd7d13716a5ad10ad454ca2e22339008c1fd2.tar.gz
brdo-dbfcd7d13716a5ad10ad454ca2e22339008c1fd2.tar.bz2
- Patch #137415 by slantview: simplified the cache API/usages, and made it a tad smarter. Makes it easier to program for, and easier to replace. Will need to be documented.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install30
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index b5f93887d..f409de7fa 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -219,6 +219,7 @@ function system_install() {
expire int NOT NULL default '0',
created int NOT NULL default '0',
headers text,
+ serialized int(1) NOT NULL default '0',
PRIMARY KEY (cid),
INDEX expire (expire)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
@@ -228,6 +229,7 @@ function system_install() {
expire int NOT NULL default '0',
created int NOT NULL default '0',
headers text,
+ serialized int(1) NOT NULL default '0',
PRIMARY KEY (cid),
INDEX expire (expire)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
@@ -237,6 +239,7 @@ function system_install() {
expire int NOT NULL default '0',
created int NOT NULL default '0',
headers text,
+ serialized int(1) NOT NULL default '0',
PRIMARY KEY (cid),
INDEX expire (expire)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
@@ -692,6 +695,7 @@ function system_install() {
expire int NOT NULL default '0',
created int NOT NULL default '0',
headers text,
+ serialized int(1) NOT NULL default '0',
PRIMARY KEY (cid)
)");
db_query("CREATE TABLE {cache_filter} (
@@ -700,6 +704,7 @@ function system_install() {
expire int NOT NULL default '0',
created int NOT NULL default '0',
headers text,
+ serialized int(1) NOT NULL default '0',
PRIMARY KEY (cid)
)");
db_query("CREATE TABLE {cache_page} (
@@ -708,6 +713,7 @@ function system_install() {
expire int NOT NULL default '0',
created int NOT NULL default '0',
headers text,
+ serialized int(1) NOT NULL default '0',
PRIMARY KEY (cid)
)");
db_query("CREATE INDEX {cache}_expire_idx ON {cache} (expire)");
@@ -3817,6 +3823,30 @@ function system_update_6011() {
}
/**
+ * Add serialized field to cache tables
+ */
+function system_update_6012() {
+ $ret = array();
+
+ switch ($GLOBALS['db_type']) {
+ case 'pgsql':
+ db_add_column($ret, 'cache', 'serialized', 'int(1)', array('default' => "'0'", 'not null' => TRUE));
+ db_add_column($ret, 'cache_filter', 'serialized', 'int(1)', array('default' => "'0'", 'not null' => TRUE));
+ db_add_column($ret, 'cache_page', 'serialized', 'int(1)', array('default' => "'0'", 'not null' => TRUE));
+ break;
+ case 'mysql':
+ case 'mysqli':
+ $ret[] = update_sql("ALTER TABLE {cache} ADD serialized int(1) NOT NULL default '0'");
+ $ret[] = update_sql("ALTER TABLE {cache_filter} ADD serialized int(1) NOT NULL default '0'");
+ $ret[] = update_sql("ALTER TABLE {cache_page} ADD serialized int(1) NOT NULL default '0'");
+ break;
+
+ }
+
+ return $ret;
+}
+
+/**
* @} End of "defgroup updates-5.x-to-6.x"
* The next series of updates should start at 7000.
*/