Mir2Drupal - Database Migration

This page documents the Database Migration step of a migration from MIR to Drupal. There are some attached scripts which result from this documentation.

The idea is to gather enough information to build a migration module, on top of D7 Migrate Module.

There is a companion repository for this project, which contains all the code we develop in this process.

Database migration plan

  1. Research content type solutions (file, image, audio, video).
  2. Research content flagging solutions (feature, newswire, opentrash, closedtrash).
  3. Research show/hide content solutions (opentrash with message, closedtrash unavailable).
  4. Map content types:
    1. features as article with tag features.
    2. newswire as article with tag openposting, opentrash, or closedtrash. Important: do not migrate until having a solution to access permission through taxonomy (above).
    3. static pages as page (the basic query below does this also).
    4. image, audio and video as Drupal's specific content types.

MIR to Drupal database mapping considerations

Drupal's article node, fields and revision scheme comments

A complete article node insertion includes insersion of contents on the following tables:

  • node: main contents of a node, contains a key for a revision (below).
  • node_revision: present version of a node's content.
  • field_data_body: the summary, body and type of body content (full_html, filtered_html, plain_text, ...). Attention: summary doesn't accept HTML!
  • field_revision_body: present version of above, revisions works as in nodes.
  • node_comment_statistics: statistics about comments.

Images migration

  • Do we have to set a limit on the number of images to be uploaded?
  • There are 90211 images on the database.
  • 89676 images are marked as "published".
  • 535 images are marked as "not published".
  • 17444 images are not associated with content and do not exist in the MIR's media path (only 330 marked as "not published").


  • Use installation profile to create content types and fields (author_name, author_url, author_email).
  • Figure out content flagginng/tagging, viewing permission (newswire, feature, opentrash, closedtrash) and access restricion to them.

Page configurations

  • Set NOWYSIWYG = 1

-- DrebS - 16 May 2011
Topic attachments
I Attachment Action Size Date Who Comment
mir2drupal-features.py.txttxt mir2drupal-features.py.txt manage 5 K 16 May 2011 - 13:53 UnknownUser This is an initial script to migrate the 'content' table from MIR's psql to D7's mysql.
Topic revision: r10 - 05 Jun 2011, DrebS
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback