apex/migrations

Database migrations

2.0.6 2023-07-10 18:56 UTC

This package is auto-updated.

Last update: 2024-04-10 20:42:09 UTC


README

A lightweight migrations package designed to promote SQL schemas written in SQL, support projects with multiple packages / repositories, and work across mySQL, PostgreSQL and SQLIte from one database schema. It supports:

  • Maintain sets of migrations amongst multiple packages / repositories.
  • Groups migrations into transactions when they were installed, allowing easy rollbacks.
  • Includes author information within each migration.
  • Automatically coverts SQL statements between mySQL, PostgreSQL and SQLite allowing interopable database schemas.

Installation

Install via Composer with:

composer require apex/migrations

Table of Contents

  1. Getting Started
  2. Migration Class
  3. CLI Commands (./apex-migrations)
    1. create
    2. status
    3. history
    4. migrate
    5. rollback

Support

If you have any questions, issues or feedback for Syrus, please feel free to drop a note on the ApexPl Reddit sub for a prompt and helpful response.

Follow Apex

Loads of good things coming in the near future including new quality open source packages, more advanced articles / tutorials that go over down to earth useful topics, et al. Stay informed by joining the mailing list on our web site, or follow along on Twitter at @mdizak1.