PHPackages                             traackr/sql-migration - 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. traackr/sql-migration

ActiveCakephp-plugin[Database &amp; ORM](/categories/database)

traackr/sql-migration
=====================

SQL migration plugin for CakePHP

0.7(1y ago)459.0kPHP

Since Jun 5Pushed 1y ago17 watchersCompare

[ Source](https://github.com/Traackr/cakephp-sqlmigration)[ Packagist](https://packagist.org/packages/traackr/sql-migration)[ Docs](https://traackr.com/)[ RSS](/packages/traackr-sql-migration/feed)WikiDiscussions master Synced 1mo ago

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

CakePHP SQL Migration Plugin
============================

[](#cakephp-sql-migration-plugin)

Introduction
------------

[](#introduction)

This is a CakePHP plugin to manage database schema updates

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

[](#installation)

To install this plugin you can:

- Clone the project on GitHub: . Make sure to clone in in your `app/Plugin` directory, preferably in a directory called `SqlMigration`
- Use Composer to manage this plugin as a dependency. To do this, simply add this to your `composer.json` file:

```
"minimum-stability": "dev",
"require": {
   "traackr/sql-migration": "dev-master"
}

```

Requirements
------------

[](#requirements)

All upgarde scripts are SQL scripts and are run via `mysql` therefore the `mysql` executable you want to use must be in your path for the plugin to work.

Setup
-----

[](#setup)

This plugin uses a database table (`schema_versions`) to keep track of schema upgrades. To get started you need to setup the plugin, which will create that table for you. Once the plugin is installed, simply do (in your `app` directory):

```
Console/cake SqlMigration.SqlMigration setup

```

It is safe to run this command multiple times. On subsequent calls, the command will simply try to apply any changes to the `schema_versions` table if any is requires (this might happen if/when you upgrade to a new version of this plugin).

Upgrade script
--------------

[](#upgrade-script)

Upgarde scripts are simple SQL scripts and need to live in the following directory: `app/Config/Sql`. Ths script's names must follow this naming convention: `upgrade-.sql`

Running an upgrade
------------------

[](#running-an-upgrade)

To run the upgrade scripts on your schema, simply call:

```
Console/cake SqlMigration.SqlMigration

```

The SqlMigration plugin will run all the upgrade scripts that have not been applied yet (based on the information found in the `schema-versions` table). The version numbers to not have to be continuous (ie. you can skip some versions), the plugin will apply the scripts in sequence and skip missing versions. If you later add a new upgrade scripts for any missing version (e.g. one was created in a branch and merged with the main core later), these scripts will be applied the next time you run the plugin (i.e. it will try to fill the gaps).

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance44

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.6% 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 ~715 days

Recently: every ~994 days

Total

7

Last Release

439d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/696635?v=4)[David Chancogne](/maintainers/dchancogne)[@dchancogne](https://github.com/dchancogne)

---

Top Contributors

[![dchancogne](https://avatars.githubusercontent.com/u/696635?v=4)](https://github.com/dchancogne "dchancogne (12 commits)")[![elijahsummers](https://avatars.githubusercontent.com/u/1902485?v=4)](https://github.com/elijahsummers "elijahsummers (5 commits)")

### Embed Badge

![Health badge](/badges/traackr-sql-migration/health.svg)

```
[![Health](https://phpackages.com/badges/traackr-sql-migration/health.svg)](https://phpackages.com/packages/traackr-sql-migration)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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