D6 has the lovely Schema API, but D5 users are stuck with a CRAM that won't talk to PostgresQL databases. :( The attached patch fixes that. Tested and works. (Please note that this isn't updated for #224640: Schema changes, so if that happens to be committed first, please mark this CNW.)

Comments

selmanj’s picture

I'm going to hold off on this one until I can install a copy of postgres and test it out. I'd love to have postgres support though; too many modules don't support postgres even though drupal core does.

Freso’s picture

You could probably go ahead and do #224640: Schema changes in the mean time then, and I'll update this patch to fit that update. The update script for pgsql wouldn't be needed either, as the initial pgsql database would indeed use smallint.

Freso’s picture

Title: PostgresQL support for 5.x version » PostgreSQL support for 5.x version

Oh, and btw, until this is approved and checked in, it would probably be good to have a warning, perhaps similar to User Related Content's, so PostgreSQL users don't install the module and think everything is perfect.

selmanj’s picture

Status: Needs review » Fixed

Commited. Thanks!

Freso’s picture

StatusFileSize
new1.25 KB

One thing missing though, is an update for people who installed the module with pgsql and haven't been able to get it to work. This update is the same as cram_update_1 for D6, just for D5. :) As such, it checks if cram_nonce exists and creates it if it isn't there, and if people for some reason should have cram_challenge left in the database, it will be dropped (which is why I also let the MySQL stay, so MySQL'ers can still have the pleasure of cram_nonce, even if they used to use cram_challenge).

I'm going to just check this in. It's really just the same code as is already in cram_install(), only it's now checking if the table already exists - as well as whether the old cram_challenge exists and drops that. These updates should/could probably be removed when the first stable is released.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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