Xaraya to Drupal Migration Script

2 min read >

Xaraya to Drupal Migration Script

Engineering Insights & Web Platforms

Using some functionalities from this script I managed to port a Xaraya 1.4 installation to Drupal 6.13.

The script performs the following tasks:

  • imports users
  • imports articles and comments
  • imports forums and comments
  • imports content types
  • imports vocabularies and terms
  • imports files

The first thing I’ve done was to eliminate the sequences table, which is deprecated starting from Drupal version 4.

Next, when managing categories, I’ve used the xaraya categories with parent id equal to 0 as Content Types and Vocabularies and inserted all the others as terms associated with the vocabulary.

The term hierarchy is created by running a script on the term_hierarchy table setting parent_id 0 for the first child and the original parent_id for the next ones.

With regard to files and images, Inserting them into the ‘files’ table is not enough – the FileField
and ImageField Drupal modules are mandatory in order to associate a field with a node. (this is still a work in progress)

One last note: in order to maintain database integrity, the original id-s must be used in all tables.

Unlock innovation and digital transformation for your business.

Get in touch

We are always happy to talk

Phone

+40-21-223-7700

Email

hello@tremend.com

Address

165 Splaiul Unirii, Timpuri Noi Square,
TN Office 2 building, 4th floor,
District 3, Bucharest, Romania, 030134