PHPackages                             eril/migraw - 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. eril/migraw

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

eril/migraw
===========

Simple SQL-first migrations for PHP.

v0.1.0(today)00MITPHPPHP ^8.1CI passing

Since Jun 9Pushed todayCompare

[ Source](https://github.com/erilshackle/php-migraw)[ Packagist](https://packagist.org/packages/eril/migraw)[ Docs](https://github.com/erilshackle/php-sql-migrator)[ RSS](/packages/eril-migraw/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Migraw
======

[](#migraw)

SQL-first migrations for PHP. Write SQL. Not magic.

Migraw is a lightweight migration tool focused on explicit SQL.

Write raw SQL when you want complete control, or use the optional SQL builder for common operations. No schema diffing, no introspection, no complex DSLs.

Features
--------

[](#features)

- SQL-first approach
- Raw SQL migrations
- Optional fluent SQL builder
- MySQL, PostgreSQL and SQLite support
- Migration batches
- Rollback support
- Dry-run mode
- Migration integrity checks using checksums
- CLI tooling
- No ORM dependency
- No framework dependency

---

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

[](#installation)

```
composer require eril/sql-migrator
```

---

Getting Started
---------------

[](#getting-started)

Initialize the configuration file:

```
php vendor/bin/migraw init
```

This will create:

```
migraw.php
database/
└── migrations/
```

---

Configuration
-------------

[](#configuration)

```
