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.
Problem/Motivation
If you use the Schema::renameTable() method you should return if the table was renamed or not. But for postgre and sqlite there is not returned value.
Proposed resolution
Its true that you always verify:
if (!$this->tableExists($table)) {
return FALSE;
}
But you can't assume that if the table exist this will be renamed. So, you need to be sure that the table was renamed.
Remaining tasks
Test the patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
adriancidComment #3
adriancidComment #4
adriancidFixed coding standart
Comment #5
daffie CreditAttribution: daffie commentedAs @alexpott said in #2862344-15: Return the returned query value from Schema::dropTable().
Comment #11
pameeela CreditAttribution: pameeela commented@adriancid, as part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)".
You haven't provided any further info on the use case since the issue was postponed, do you believe it is still relevant or can it be closed? If relevant can you provide some additional info per #5?
Comment #12
adriancid@pameeela When I was working on this issue for me was relevant to know if the table was really renamed or not but at this time I really don't need it. If the decision is to close the issue its fine for me.
Comment #13
pameeela CreditAttribution: pameeela commentedOK thanks @adriancid, I will close. If anyone feels this should be reopened, please add information about the use case per #5 to the issue summary and set the issue status back to "Active".
Thanks!