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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

Title: Get error after install, uninstall and install again » Properly delete table on uninstall

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.

webappl’s picture

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.

greggles’s picture

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.

greggles’s picture

Status: Active » Needs review
FileSize
2.58 KB

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.

greggles’s picture

Title: Properly delete table on uninstall » Don't create unnecessary table

Better title

greggles’s picture

And slightly better - if people have the table let's delete it on uninstall.

greggles’s picture

Status: Needs review » Fixed

And fixed in 5.x and HEAD. Thanks for reporting this, webappl!

Freso’s picture

Status: Fixed » Needs work

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.)

greggles’s picture

Status: Needs work » Fixed

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.

Freso’s picture

Status: Fixed » Needs review
FileSize
1.16 KB
1.25 KB

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().

greggles’s picture

Status: Needs review » Fixed

Fixed in both 5.x and HEAD. Thanks, Freso!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.