You are here

function migrate_update_7002 in Migrate 7.2

Add last_imported field to all map tables

File

./migrate.install, line 245
Migrate module installation

Code

function migrate_update_7002() {
  foreach (db_find_tables('migrate_map_%') as $tablename) {
    if (!db_field_exists($tablename, 'last_imported')) {
      db_add_field($tablename, 'last_imported', array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'UNIX timestamp of the last time this row was imported',
      ));
    }
  }
  $ret = t('Added last_imported column to all map tables');
  return $ret;
}