It looks like the path_redirect_install function is creating the table with type as a varchar(40) instead of a smallint, which is what the second update function changes it to. Sorry, no patch; it's a pretty trivial change. The Postgres case can use smallint instead of MySQL's (nonstandard?) int(10).

Comments

HorsePunchKid’s picture

Status: Active » Needs work
StatusFileSize
new1.12 KB

Here's a patch, if anyone would like to test this. It should only affect new installations. There may be some people who have installed it after update #2, so they have a database that no longer matches what update #2 intended. So maybe there needs to be an update #3 that checks the type of the type column and alters it if necessary.

HorsePunchKid’s picture

All that needs to happen in Postgres is:

ALTER TABLE {path_redirect} ALTER type TYPE smallint USING type::smallint

That's safe to run even if the conversion has already been done. I'll see about getting the equivalent working in MySQL, then roll a new patch with a new update function.

HorsePunchKid’s picture

Status: Needs work » Needs review
StatusFileSize
new1.36 KB

Here's a patch with a new update method that should work for MySQL and Postgres.

HorsePunchKid’s picture

Status: Needs review » Fixed

I committed this patch. This works with MySQL on a fresh install and when upgrading an existing install. The beta1 is somewhat broken for Postgres, so I have not tested it as thoroughly there. I will do so once fixes for Postgres are committed (next task for me).

Anonymous’s picture

Status: Fixed » Closed (fixed)

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