I just upgraded my weblinks on postgres from 5.x-whatever to 6.x-2.x and got some SQL errors. It's not likely that many people are going to see the first few errors anymore, but I thought I'd create a patch anyway.
Some remarks on a few things I encountered:
* in weblinks_update_6110(),
- NO index on 'urlhash' is created if the index on 'url' did not exist. On my pgsql installation it did not exist, so I decided to create one always. (See the code.)
- I did not change the code for mysql and I guess it is up to you to decide if you need to make another update, to conditionally create the 'urlhash' index.
* in weblinks_update_6115(),
- the first two update statements were identical, therefore superfluous. I deleted one.
- I made two 'case' blocks instead of reordering code, so you can better see what I added. (Even though the code is a bit bloated now, maybe.)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | weblinks_screenshot.JPG | 48.47 KB | bfo |
| weblinks_devinstall.psql_.patch | 6.02 KB | roderik |
Comments
Comment #1
bfo commentedI'm about to move my site from 5.x to 6.x and my links from linksDB to this and the patch will come in very useful.
Thanks
Comment #2
nancydruMost of that is because of people re-applying updates (and wondering why it fails) or making really big update jumps.
Thanks for the patch, I committed it.
@bfo: This will be in the next -dev release in an hour or so, and in 6.x-2.1, which is due out shortly.
Comment #3
nancydruComment #4
bfo commentedHi
I'm still having an issue with this.
I tried the dev version: weblinks-6.x-2.x-dev
and still get errors, see attached screenshot
Thanks
bfo
Comment #5
nancydruSee #521652: PostgreSQL fixes; mostly, _weblinks_get_query() rewrite - reverting status.
Comment #6
nancydruIncluded in 6.x-2.1.