PHPackages                             tflori/breyta - 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. tflori/breyta

ActiveLibrary[Database &amp; ORM](/categories/database)

tflori/breyta
=============

Library for database migrations

v1.1.1(2y ago)26.1k↓50%[1 PRs](https://github.com/tflori/breyta/pulls)MITPHPPHP ^7.1 || ^8.0

Since Nov 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tflori/breyta)[ Packagist](https://packagist.org/packages/tflori/breyta)[ RSS](/packages/tflori-breyta/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (16)Used By (0)

breyta
======

[](#breyta)

[![.github/workflows/push.yml](https://github.com/tflori/breyta/actions/workflows/push.yml/badge.svg)](https://github.com/tflori/breyta/actions/workflows/push.yml)[![Test Coverage](https://camo.githubusercontent.com/eb7dea8b0df9429a9d46bafb5439122b77c18c77259b18e7ef2f1ede3e3949cc/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36366132343533383533333739316164666435622f746573745f636f766572616765)](https://codeclimate.com/github/tflori/breyta/test_coverage)[![Maintainability](https://camo.githubusercontent.com/fbfe0495e93c0cc31bd9b6998327f04a0b209ac53f70854b5287c17fd66ffb2d/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36366132343533383533333739316164666435622f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/tflori/breyta/maintainability)[![Latest Stable Version](https://camo.githubusercontent.com/b34cecdcb41299bc2d6a2524a97ba94dcb26bc2a6128c40e004b16f508faf13a/68747470733a2f2f706f7365722e707567782e6f72672f74666c6f72692f6272657974612f762f737461626c652e737667)](https://packagist.org/packages/tflori/breyta)[![Total Downloads](https://camo.githubusercontent.com/613d8485c03a1c74356a0cf3a9b33f66c3a10465fa4184aa7ed1837809f6c5ac/68747470733a2f2f706f7365722e707567782e6f72672f74666c6f72692f6272657974612f646f776e6c6f6164732e737667)](https://packagist.org/packages/tflori/breyta)[![License](https://camo.githubusercontent.com/b4df551c68481afb43ea5d194855a7a826eafed61f9ad19e8554a7349a8c71cc/68747470733a2f2f706f7365722e707567782e6f72672f74666c6f72692f6272657974612f6c6963656e73652e737667)](https://packagist.org/packages/tflori/breyta)

Breyta is a **library** for database migrations. There are a lot of applications for database migrations but no actual library (without any user interface).

Trivia
------

[](#trivia)

I created this library after trying ruckusing-migrations. It's the only one that does not require any additional library to provide a user interface and is mentioned in awesome-php. Unfortunately it seems to be not actively developed and maintained. Also I'm missing some functionality and it is very old, not using PSR-2/4 and namespaces.

The name for this library comes again from the Icelandic language and means "to change".

Concept
-------

[](#concept)

- A migration is a set of database statements
- A migration has to run in a transaction
- Logging is important and goes to the migration table
- No code generating from this library (pure SQL)
- No user interface (API only)
- Generate fancy output and support progress bars

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

[](#installation)

We only support and suggest using composer - everything else on your own risk.

```
$ composer require tflori/breyta
```

Usage
-----

[](#usage)

> This might change in the next days till version 1.

Migration Script:

```
