PHPackages                             undpaul/up-migrate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. undpaul/up-migrate

ActiveDrupal-module[Database &amp; ORM](/categories/database)

undpaul/up-migrate
==================

Provides some migration plugins and helpers

06.7k1PHP

Since Feb 19Pushed 8y ago4 watchersCompare

[ Source](https://github.com/undpaul/up-migrate)[ Packagist](https://packagist.org/packages/undpaul/up-migrate)[ RSS](/packages/undpaul-up-migrate/feed)WikiDiscussions 8.x-3.x Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

undpaul Migrate
===============

[](#undpaul-migrate)

This project aims to give you a jump-start on building migrations.

Installation
------------

[](#installation)

Clone the project into `modules/custom` of your Drupal installation and run `composer install` within the modules directory.

Usage
-----

[](#usage)

*up\_migrate* comes with some base classes and tools useful for building migrations.

### ID maps

[](#id-maps)

#### FastSql

[](#fastsql)

Since the mapping tables create by *Migrate* do not have proper unique indexes, the ID map "fastsql" alters the definitions of the map tables and add proper indexes. This increases migration performance significant. *up\_migrate* sets the ID map for **all** migrations if they do not specify the property `idMap` for themself.

### Source plugins

[](#source-plugins)

*up\_migrate* comes with a set of pre-defined source plugins.

#### SqlBase

[](#sqlbase)

The abstract class `\Drupal\up_migrate\Plugin\migrate\source\SqlBase` is meant to be the parent class for all custom migration sources. It allows configuring sources from directly within a migration yml-file.

Example for definition in *migrate\_plus.migration.{id}.yml*:

```
source:
  table:
    name: users
    alias: u
    ids:
      uid: integer

```

This sets the base table of the migration source to a table named "users". The table can be referenced by using the alias "u" and have one unique key named "uid".

Example for definition in custom source plugin (must extend `SqlBase`)

```
/**
 * @MigrateSource(
 *   id = "upm_examples__user",
 *   table = {
 *     "name": "users",
 *     "alias": "u",
 *     "ids": {
 *       "uid": "integer"
 *     }
 *   }
 * )
 */

```

For more complex ID definitions simply override the function `getIds()`.

### Adding additional databases as migration source

[](#adding-additional-databases-as-migration-source)

Usually you want to migrate data from one or more existing databases to your new site. To be able to reference these source databases in your migrations, simply run the following drush command

```
drush upm-da {key} {database name} --username={name} --password={password}

```

For more information about the command and its options run `drush help upm-da`.

In your migration yml-file (or in your source class) set the key of the database to use

```
source:
  key: 'database-key-from-above'

```

The source plugin `SqlBase` will automatically switch to the new database and fetch all data from there.

### Stream wrapper

[](#stream-wrapper)

*up\_migrate* provides a custom read-only stream wrapper to access files needed for migrations in a handy way.

To setup the correct directoy to your migration files, add the following code to your *settings.php*

```
// Set private folder.
$settings['file_migration_source_path'] = '/path/to/migration/files';

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6d0667ccddecb7c5bca8d3a3042752c7880cf363fdad2e36de472989c4d5b58?d=identicon)[undpaul](/maintainers/undpaul)

---

Top Contributors

[![derhasi](https://avatars.githubusercontent.com/u/118502?v=4)](https://github.com/derhasi "derhasi (2 commits)")

---

Tags

drupal-8drupal-migratedrupal-module

### Embed Badge

![Health badge](/badges/undpaul-up-migrate/health.svg)

```
[![Health](https://phpackages.com/badges/undpaul-up-migrate/health.svg)](https://phpackages.com/packages/undpaul-up-migrate)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M543](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M209](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
