PHPackages                             itx/doctrine-migrations - 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. itx/doctrine-migrations

ActiveTypo3-cms-extension[Database &amp; ORM](/categories/database)

itx/doctrine-migrations
=======================

TYPO3 extension for versioned migration files, integrating doctrine/migrations

1.0.2(1y ago)25.8k↓43.1%GPL-3.0-or-laterPHPPHP &gt;=8.1

Since Sep 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/itx-informationssysteme/doctrine-migrations)[ Packagist](https://packagist.org/packages/itx/doctrine-migrations)[ RSS](/packages/itx-doctrine-migrations/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (8)Used By (0)

Doctrine Migrations Extension for TYPO3
=======================================

[](#doctrine-migrations-extension-for-typo3)

This extension provides a CLI for [doctrine migrations](https://www.doctrine-project.org/projects/doctrine-migrations/en/3.8/reference/introduction.html#introduction) to manage database migrations in TYPO3. Migrations are defined in versioned files, which can be created and executed via the CLI.

Installation (Composer)
-----------------------

[](#installation-composer)

- Add the extension by executing `composer req itx/doctrine-migrations`
- Create a folder e.g. `Classes/Migrations` inside your extension's folder
- In the TYPO3 Backend, add the path where you want to save your version files and the appropriate namespace at `Settings > Extension Configuration > doctrine_migrations`
- Alternatively you can configure these paths inside your additional.php file e.g.

```
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['doctrine_migrations']['migrationFilesLocation'] = 'EXT:your_extension/Migrations';
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['doctrine_migrations']['migrationFilesNamespace'] = 'YourVendor\YourExtension\Migrations';
```

Optionally you can override the [default doctrine migrations](https://www.doctrine-project.org/projects/doctrine-migrations/en/3.8/reference/configuration.html#migrations-configuration) configuration by providing an array like so in your additional.php file:

```
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['doctrine_migrations']['overrideConfiguration'] = [
	'table_storage' => [
			'table_name' => 'different_table_name_xyz',
	],
];
```

Usage
-----

[](#usage)

- The extension is controlled via CLI
- You can use commands with `vendor/bin/typo3 migrations: `

Walkthrough
-----------

[](#walkthrough)

### Creating a version file

[](#creating-a-version-file)

- To generate a version file at your chosen location, use `vendor/bin/typo3 migrations:generate`
- The created file is named Version{date}, {date} being its' time of creation in `YmdHis` format
- This file comes with three pregenerated, empty functions: `getDescription()`, `up()` and `down()`
- Enter the necessary SQL Code for your desired migration into the `up()` function, and the code which can revert the migration into the `down()` function like this: `$this->addSql('');`
- Take care to escape any single quotes inside the `addSql()` function

### Working with version files

[](#working-with-version-files)

- `vendor/bin/typo3 migrations:status` show the current status of the migrations: which version is currently in use, which is previous/next/latest one etc.
- Once you have a migration file prepared with the desired changes to your database, you can execute it by running either:
    - `vendor/bin/typo3 migrations:migrate` to automatically run every version file from your current state to the latest one, or
    - `vendor/bin/typo3 migrations:execute "Path\To\Your\File" --up` to only run the `up()` method of your selected version file
    - Using `--down` instead of `--up` in the above command executes the version file's `down()` function instead
- Alternatively, you can use the keywords `first`, `latest`, `prev` or `next` after `vendor/bin/typo3 migrations:migrate` to migrate to the first, latest, previous or next migration file respectively
- For more information on these and some more commands and their options refer to [this](https://www.doctrine-project.org/projects/doctrine-migrations/en/3.8/reference/managing-migrations.html)

Troubleshooting
---------------

[](#troubleshooting)

- If you get permission errors while trying to save your modified version files, try running `chmod g+w -R *` in the container bash

Further Info
------------

[](#further-info)

- For more information on doctrine migrations, refer to [the official doctrine documentation](https://www.doctrine-project.org/projects/doctrine-migrations/en/3.8/reference/introduction.html#introduction)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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.

###  Release Activity

Cadence

Every ~8 days

Total

7

Last Release

550d ago

Major Versions

0.9.2 → 1.0.12024-09-27

1.0.2 → v13.x-dev2024-11-14

### Community

Maintainers

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

---

Top Contributors

[![paeddym](https://avatars.githubusercontent.com/u/128425620?v=4)](https://github.com/paeddym "paeddym (15 commits)")[![benjasper](https://avatars.githubusercontent.com/u/28984253?v=4)](https://github.com/benjasper "benjasper (6 commits)")

---

Tags

doctrinemigrationstypo3typo3-extensiontypo3-v11typo3-v12

### Embed Badge

![Health badge](/badges/itx-doctrine-migrations/health.svg)

```
[![Health](https://phpackages.com/badges/itx-doctrine-migrations/health.svg)](https://phpackages.com/packages/itx-doctrine-migrations)
```

###  Alternatives

[stefanfroemken/mysqlreport

Analyze and profile your TYPO3 databases queries

1314.9k](/packages/stefanfroemken-mysqlreport)[opensolutions/doctrine2bridge

Adds the the power of Doctrine2 to Laravel 4 (with support for SQL logging and authentication)

133.7k](/packages/opensolutions-doctrine2bridge)

PHPackages © 2026

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