Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
af34a179
Commit
af34a179
authored
May 29, 2007
by
Dries
Browse files
- Patch
#147285
by drewish: add db_rename_table().
parent
556ef56c
Changes
2
Show whitespace changes
Inline
Side-by-side
includes/database.mysql-common.inc
View file @
af34a179
...
...
@@ -184,6 +184,20 @@ function db_type_map() {
return
$map
;
}
/**
* Rename a table.
*
* @param $ret
* Array to which query results will be added.
* @param $table
* The table to be renamed.
* @param $new_name
* The new name for the table.
*/
function
db_rename_table
(
&
$ret
,
$table
,
$new_name
)
{
$ret
[]
=
update_sql
(
'ALTER TABLE {'
.
$table
.
'} RENAME TO {'
.
$new_name
.
'}'
);
}
/**
* Drop a table.
*
...
...
includes/database.pgsql.inc
View file @
af34a179
...
...
@@ -612,6 +612,20 @@ function _db_create_field_sql($name, $spec) {
return
$sql
;
}
/**
* Rename a table.
*
* @param $ret
* Array to which query results will be added.
* @param $table
* The table to be renamed.
* @param $new_name
* The new name for the table.
*/
function
db_rename_table
(
&
$ret
,
$table
,
$new_name
)
{
$ret
[]
=
update_sql
(
'ALTER TABLE {'
.
$table
.
'} RENAME TO {'
.
$new_name
.
'}'
);
}
/**
* Drop a table.
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment