I'm posting a pair of patches to make phpBB2Drupal compatible with PostgreSQL databases running phpBB forums. Well, almost entirely compatible. I don't know why poll importing is throwing key violation errors on the poll table, and I'm unsure of private message importing as of yet.
These patches are based on the 2006-08-21 cvs version of the software.
First, the .install patch which gives correct sql syntax for creating the tables in a postgresql drupal install:
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | phpbb2drupal.module.patch | 10.19 KB | PMunn |
| phpbb2drupal.install.patch | 2.1 KB | PMunn |
Comments
Comment #1
PMunn commentedAnd here is the module patch.
-Most queries with double-quoted strings in them are now using single quoted strings.
-Many inserted fields are now substr'd down to the maximum size of the column in the db table. PostgreSQL throws errors if you try to insert something too big into a table, it doesn't quietly truncate it.
-An IF in a privmsgs query has been turned into a CASE compatible with both PostgreSQL and MySQL (according to MySQL's manual anyway).
-A left join in that same query has been modified to not put parentheses around a table reference.
-A nonstandard insert which INSERTed several rows at once into profile_fields by putting commas between the sets has been broken into multiple INSERTs using a variable to hold the repeating initial part of the query.
-The insert into poll_votes was putting an empty string in the hostname field which required a value. I've modified it to write in "NA" instead.
I haven't tested this patch on mysql.
Comment #2
PMunn commentedI've taken a closer look at my testing database and found the Private Message import worked without issue. That leaves the polls importing issue.
Comment #3
beginner commentedThanks for your patches and the detailed description.
I have just committed the .install patch.
You forgot to add the curly brackets around the table names {}.
I have added them around the table names and around the table key names in a second patch: http://drupal.org/cvs?commit=42166
Comment #4
beginner commentedYour second patch is committed, too.
I tested it with mysql, and it seems to work as before.
Thanks again both for the patches, and for the detailed comments.
Comment #5
(not verified) commented