Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#10 | pathauto_one_table_smaller.d5.patch | 1.25 KB | Freso |
#10 | pathauto_one_table_smaller.d6.patch | 1.16 KB | Freso |
#6 | 248031-pathauto-6-stop_creating_table.patch | 3 KB | greggles |
#4 | 248031-pathauto-4-stop_creating_table.patch | 2.58 KB | greggles |
Comments
Comment #1
gregglesI 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.
Comment #2
webappl CreditAttribution: webappl commentedI'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.
Comment #3
gregglesI 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.
Comment #4
gregglesSince 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.
Comment #5
gregglesBetter title
Comment #6
gregglesAnd slightly better - if people have the table let's delete it on uninstall.
Comment #7
gregglesAnd fixed in 5.x and HEAD. Thanks for reporting this, webappl!
Comment #8
Freso CreditAttribution: Freso commentedAnother 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.)Comment #9
gregglesWell, 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.
Comment #10
Freso CreditAttribution: Freso commentedWouldn'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()
.Comment #11
gregglesFixed in both 5.x and HEAD. Thanks, Freso!
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.