PHPBB3 Importer - Postgresql

import

(Michael Marner) #1

I see in the comments of the new PHPBB importer that other database systems are coming soon. Just wondering if there’s any progress on this, or if it’s waiting for someone to start coding?

I am migrating a big, old, phpbb3 forum for a local community org. to Discourse. However, their PHPBB install was originally setup on Postgres. An unusual combo for phpbb I know.

I’ve already tested exporting the database from postgres, importing to mysql, then running the importer. However, if nobody is actively working on the postgres support then maybe this is something I can look at.

Anybody in the know?


(Gerhard Schlager) #2

I experimented with Sequel a few months ago in order to make the importer database independent without duplicating every database query for each DBMS.

At that time Sequel worked with all database systems supported by phpBB 3.0 and 3.1 (well, it didn’t support SQLite2, but who would be using that anyway?!). Unfortunately the database adapter for Firebird was deprecated in Sequel 4.22.

Anyway, my experimental version with Sequel worked quite well… Some of the database queries changed since then, so the corresponding Sequel queries would need to be changed too.

But I’m not sure if Sequel is the right solution for the problem. Writing queries with Sequel instead of SQL seems to be a lot harder. Maybe handling database dependent things like LIMIT, OFFSET, INSTR() or SUBSTRING() with some Ruby magic would be enough? @neil Any thoughts on this?

Edit: I updated my experimental version of the importer and pushed it to Github in case someone wants to take a look at it: Commits · gschlager/discourse · GitHub
It’s using Sequel and it seems to work with MySQL. I haven’t tested it on other databases yet.
I’m still not sure if using Sequel is the right thing to do.


(Michael Marner) #3

Awesome, I’ll pull down your code and test it out with postgres to see how the import goes. I haven’t had a good look at phpbb to see if it does much differently depending on database engine, but using something like Sequel seems like the right thing to do IMO.


(Arpit Jalan) #4

We now have a phpBB PostgreSQL bulk import script:


(Paul Elie Ratié) #5

This script is built for which version of phpBB ?


(Gerhard Schlager) #6

Looks like it works only with phpBB 3.0, but with a few changes to the user query it’d probably work with phpBB 3.1 as well.