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.1.0(1mo ago)26.8k↓74%GPL-3.0-or-laterPHPPHP &gt;=8.1

Since Sep 27Pushed 1mo 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 2w ago

READMEChangelog (7)Dependencies (4)Versions (9)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',
	],
];
```

Additionally, you can toggle transactions and "all or nothing" in the extension settings, if your chosen DB doesn't support those

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

48

—

FairBetter than 94% of packages

Maintenance91

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.9% 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 ~92 days

Recently: every ~161 days

Total

8

Last Release

45d 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 (17 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

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k69](/packages/friendsoftypo3-content-blocks)[patchlevel/event-sourcing

A lightweight but also all-inclusive event sourcing library with a focus on developer experience

213396.3k15](/packages/patchlevel-event-sourcing)[oat-sa/tao-core

TAO core extension

64147.9k151](/packages/oat-sa-tao-core)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40543.5k](/packages/wazum-sluggi)[b13/content-sync

Content Sync - Sync Database Tables and Files between two TYPO3 Installations

105.2k](/packages/b13-content-sync)

PHPackages © 2026

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