How to migrate from mySQl to PostgreSQL?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
laengerich
Posts: 1
Joined: Mon Apr 14, 2014 11:38 am

How to migrate from mySQl to PostgreSQL?

Post by laengerich »

Hi,

I tried to migrate PMF 2.8.8 from mySQL to PostgreSQL. I tried to use the backup/restore mechanism. This was successful in *some* topics, not in all:
  • Some errors on importing the backup made from the mySQL install stating problems with \", I fixed those by editing the sql file.
  • Errors inserting the data in faquserdata: error with last_modified being varchar(14) whereas the sql was showing up timestamps like '2014-03-02 14.23.34'. I fixed those by editing the sql file.
  • All contents was showing up then, but the line breaks not show as \r\n
  • Inserting a new faq resulted in not showing up, but linking an old faq into the category i was trying to insert the new faq. It may be a problem with the sequences in postgresql. When saving, the unique id changed from 1105 to i.e. 1004 and the new entries do not show up, even when searching for them
Are there any hints how to do a better job? How are the sequences handled in PMF backup/restore?

Bernd
Thorsten
Posts: 15568
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: How to migrate from mySQl to PostgreSQL?

Post by Thorsten »

Hi,

we store the sequences in PostgreSQL different from MySQL, the DB structures are not 100% equal due to different feature sets in PostgreSQL und MySQL.

I think it's possible to export the FAQ in MySQL in a PostgreSQL file with mysqldmp.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
dangleemarcar
Posts: 5
Joined: Wed Apr 16, 2014 3:34 pm
Contact:

Re: How to migrate from mySQl to PostgreSQL?

Post by dangleemarcar »

Hi,

we store the sequences in PostgreSQL different from MySQL, the DB structures are not 100% equal due to different feature sets in PostgreSQL und MySQL.

I think it's possible to export the FAQ in MySQL in a PostgreSQL file with mysqldmp.

bye
Thorsten
So do you mean that exporting will play the big part for the changing? :?:
Social Media Agency
Thorsten
Posts: 15568
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: How to migrate from mySQl to PostgreSQL?

Post by Thorsten »

Hi,

yes, but exporting via mysqldump, not phpMyFAQ

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply