diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-16 21:45:30 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-16 21:45:30 +0000 |
commit | 7f85bc5bc407faeae64be7dcfbad3f5ab50aa44b (patch) | |
tree | ad5660703b05af7aca3544140b55cb57510b359d /modules/system | |
parent | 525539777569cd7371db908908553dcdadd8c62d (diff) | |
download | brdo-7f85bc5bc407faeae64be7dcfbad3f5ab50aa44b.tar.gz brdo-7f85bc5bc407faeae64be7dcfbad3f5ab50aa44b.tar.bz2 |
#208938 by bjaspan, scor: use schema PI for index updates instead of database dependent code
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.install | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 4e7922b00..cae51cbde 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -1114,16 +1114,7 @@ function system_update_last_removed() { */ function system_update_1022() { $ret = array(); - switch ($GLOBALS['db_type']) { - case 'mysql': - case 'mysqli': - $ret[] = update_sql('ALTER TABLE {users} ADD KEY created (created)'); - break; - - case 'pgsql': - $ret[] = update_sql("CREATE INDEX {users}_created_idx ON {users} (created)"); - break; - } + db_add_index($ret, 'users', 'created', array('created')); // Also appears as system_update_6004(). Ensure we don't update twice. variable_set('system_update_1022', TRUE); return $ret; @@ -1187,16 +1178,7 @@ function system_update_6002() { */ function system_update_6003() { $ret = array(); - switch ($GLOBALS['db_type']) { - case 'mysql': - case 'mysqli': - $ret[] = update_sql('ALTER TABLE {comments} ADD KEY status (status)'); - break; - - case 'pgsql': - $ret[] = update_sql("CREATE INDEX {comments}_status_idx ON {comments} (status)"); - break; - } + db_add_index($ret, 'comments', 'status', array('status')); return $ret; } |