diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-15 17:53:34 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-15 17:53:34 +0000 |
commit | 977d635bb1705ecebae8783a5e629214986eaddf (patch) | |
tree | 5da3fbe936ec79ca2ee9d8131c0e12f36bb7670c /modules/system/system.install | |
parent | e1642603eac05665d959c3d63ea8d1efbe9e431a (diff) | |
download | brdo-977d635bb1705ecebae8783a5e629214986eaddf.tar.gz brdo-977d635bb1705ecebae8783a5e629214986eaddf.tar.bz2 |
- Patch #332333 by dmitrig01, alexw: add a real API to path.module.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r-- | modules/system/system.install | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 3c3fc0c71..e69bb6e24 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -1583,14 +1583,14 @@ function system_schema() { 'unsigned' => TRUE, 'not null' => TRUE, ), - 'src' => array( + 'source' => array( 'description' => 'The Drupal path this alias is for; e.g. node/12.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), - 'dst' => array( + 'alias' => array( 'description' => 'The alias for this path; e.g. title-of-the-story.', 'type' => 'varchar', 'length' => 255, @@ -1606,11 +1606,11 @@ function system_schema() { ), ), 'unique keys' => array( - 'dst_language_pid' => array('dst', 'language', 'pid'), + 'alias_language_pid' => array('alias', 'language', 'pid'), ), 'primary key' => array('pid'), 'indexes' => array( - 'src_language_pid' => array('src', 'language', 'pid'), + 'source_language_pid' => array('source', 'language', 'pid'), ), ); @@ -1944,7 +1944,6 @@ function system_update_7007() { return implode(', ', $messages); } - /** * Use the poll_choice primary key to record votes in poll_votes rather than * the choice order. Rename chorder to weight. @@ -2741,6 +2740,21 @@ function system_update_7041() { } /** + * Rename dst and src to source and alias. + */ +function system_update_7042() { + // Drop indexes. + db_drop_index('url_alias', 'src_language_pid'); + db_drop_unique_key('url_alias', 'dst_language_pid'); + // Rename fields. + db_change_field('url_alias', 'src', 'source', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')); + db_change_field('url_alias', 'dst', 'alias', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')); + // Add indexes back. + db_add_index('url_alias', 'source_language_pid', array('source', 'language', 'pid')); + db_add_unique_key('url_alias', 'alias_language_pid', array('alias', 'language', 'pid')); +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */ |