Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The attached patch adds a db_rename function to allow tables to be renamed.
Comment | File | Size | Author |
---|---|---|---|
db_rename.patch | 1.65 KB | drewish | |
Comments
Comment #1
nedjo+1, this would be a useful addition.
The patch http://drupal.org/node/140860 to get consistent table names in core would use this.
MySQL supports a RENAME TABLE syntax. Is the ALTER TABLE syntax used in the patch equally supported?
Comment #2
drewish CreditAttribution: drewish commentedgood question. it is supported by both mysql 4.1 and 5.0+. i've found it supported for postgresql versions back to 7.3.
Comment #3
bjaspan CreditAttribution: bjaspan commentedThis is a good addition to the API. Tested on MySQL and PostgresQL, works fine.
Comment #4
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #5
(not verified) CreditAttribution: commented