Don't create unnecessary table
webappl - April 17, 2008 - 19:37
| Project: | Pathauto |
| Version: | 5.x-2.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
If you install Pathauto, then uninstall completely, then install again, you will be getting error that MySQL can not create table since it is already exist.
Suggestion:
Installation procedure should check on existence for this table first and give a warning not an error.

#1
I think we should just properly delete the table during the uninstall.
Which database and version do you use? I only ask in case that is part of the problem.
#2
I'm using MySQL 5.0.32.
I don't think that it is part of the problem at all.
You do whatever you feel right just make sure that when you delete this table the old content with aliases created by your module will still accessible.
BTW, it is very needed feature to make path sound appropriate for content. Thank you for module.
#3
I agree, I do not think that your DB could be the problem. I test on MySQL most of the timeand wanted to make sure this was not a problem between the query and pgsql.
Thanks.
#4
Since we don't use this table any more this could either drop the table or stop making it. So, I decided that Pathauto should stop making this table.
#5
Better title
#6
And slightly better - if people have the table let's delete it on uninstall.
#7
And fixed in 5.x and HEAD. Thanks for reporting this, webappl!
#8
Another thing to do might be to make an
_update()that removes the table, so people upgrading from earlier versions that installed the table (whether or not it was used) have the table removed? (Thus removing database cruft.)#9
Well, I added code to remove it in the uninstall. I think I'll still need that table some day and plan to figure out how to best use/modify it then.
#10
Wouldn't it be better to remove the table now, and reintroduce it later when(/if) it turns out you need it anyway. AFAICT, the module isn't even creating the table anywhere, so people who have the table, got it from some old (and outdated) code. Should it turn out you need it later, surely it would be best if you could start from scratch without having to make sure people who never uninstalled the module have their table updater properly?
By the way, attached are a patch for D5 and a patch for D6, moving the table dropping to
pathauto_update_7().#11
Fixed in both 5.x and HEAD. Thanks, Freso!
#12
Automatically closed -- issue fixed for two weeks with no activity.