![]() * Uses a modified version of drupal_write_record to insert. * Select all records form the MySQL table and inserts them into the PostgreSQL. Migrate_table ( $table -> tables_in_icomem ) Setup ready, let's loop over existing tables. 'driver' => 'pgsql', // replace with your database driverĭatabase :: addConnectionInfo ( 'PGMigration', 'default', $pgsql_database ) 'host' => 'localhost', // assumes localhost 'password' => '', // assuming this is necessary 'username' => 'YOUR_PGSQL_NAME', // assuming this is necessary Using this function I benefit form Drupal wisdom on inserting data into postgreSQL (if you rad the code you will see some tweaks when inserting into a PostgreSQL DB). So, what to do? I decided to trust in Drupal and use the drupal_write_record function to insert one by one every record from my MySQL database to PostgreSQL. As I mentioned above there are problemas with PostgreSQL 9.x and serialized data, at least when you try to copy from MySQL. This scripts seems to set up correctly sequences too. Step 1 - Install Nginx Webserver Step 2 - Install and Configure PHP-FPM Step 3 - Install and Configure MariaDB Server Step 4 - Generate SSL Letsencrypt Step 6 - Set up Nginx Virtualhost for Drupal 9 Step 6 - Download Drupal Step 7 - Drupal Post Installation Drupal is a well-known open source content management system based on PHP. ![]() So, use this script to replicate the same table structure of your MySQL site. This scripts cliams to migrate structure and data but at least when using PostgreSQL 9.x you'll have problemas with PHP serialized data. I've used a Ruby Script to do the job, mysql2postgres. Sure, you may put all this fields in a Feature and use it to create those tables but is not very handy. But will not get the autogenerated tables form field API, for example. One aproach it to install a clean Drupal with the codebase of the MySQL site and enable all used modules. MySQL and PostgreSQL use different data types for its columns, they define its tables in its own way, you can't use MySQl definitions. I've tried several ways, but always I came up against some problem. There are several problemas to solve: table structure translation, autoincrement values / sequences, serialized data, etc. So I want to share my experience with this group where I think could be useful. ![]() (line 427 of C:\Apache2\htdocs\drupal710\sites\all\modules\ctools\includes\export.inc).Īfter several hours of uncertainty it seems that I have managed to migrate a MySQL Drupal to a PostgreSQL. ![]() WHERE (qid IN (:db_conditionplaceholder_0)) Array StatusText: Service unavailable (with message) ResponseText:ĮRROR: relation "ldap_query" does not exist Path: /drupal710/admin/structure/views/view/ad_users_example/preview/page/ajax HTTP Result Code: 500 Debugging information follows. Version string PostgreSQL 9.1.1, compiled by Visual C++ build 1500, 64-bit My LDAP auth is working like a charm, but I researching a small issue. (i.e., saving LDAP Query and LDAP Views components untill last, ldap_query table was created. By uninstalling LDAP modules, reinstalling, then activating components incrementally ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |