summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
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.
*/