migrate.install

Same filename in other branches
  1. 9 core/modules/migrate/migrate.install
  2. 8.9.x core/modules/migrate/migrate.install
  3. 11.x core/modules/migrate/migrate.install

Contains install and update functions for Migrate.

File

core/modules/migrate/migrate.install

View source
<?php


/**
 * @file
 * Contains install and update functions for Migrate.
 */

/**
 * Implements hook_update_last_removed().
 */
function migrate_update_last_removed() {
    return 8001;
}

/**
 * Remove the year 2038 date limitation.
 */
function migrate_update_10100(&$sandbox = NULL) {
    $connection = \Drupal::database();
    $tables = $connection->schema()
        ->findTables('migrate_map_%');
    if (!empty($tables) && $connection->databaseType() != 'sqlite') {
        foreach ($tables as $table) {
            $new = [
                'type' => 'int',
                'unsigned' => TRUE,
                'not null' => TRUE,
                'default' => 0,
                'description' => 'UNIX timestamp of the last time this row was imported',
                'size' => 'big',
            ];
            $connection->schema()
                ->changeField($table, 'last_imported', 'last_imported', $new);
        }
    }
}

Functions

Title Deprecated Summary
migrate_update_10100 Remove the year 2038 date limitation.
migrate_update_last_removed Implements hook_update_last_removed().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.