Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
294
Merge Requests
294
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
af34a179
Commit
af34a179
authored
May 29, 2007
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#147285
by drewish: add db_rename_table().
parent
556ef56c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
includes/database.mysql-common.inc
includes/database.mysql-common.inc
+14
-0
includes/database.pgsql.inc
includes/database.pgsql.inc
+14
-0
No files found.
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
Markdown
is supported
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