Framework agnostic database migrations for PHP.

Overview

Phoenix

Framework agnostic database migrations for PHP.

PHP unit PHPStan level PHP static analysis SensioLabsInsight Latest Stable Version Total Downloads PHP 7 supported

Features

  • Validation all settings in migration before executing first query
  • Multiple migration directories
  • Migrate up and down
  • Print executed queries (in debug mode -vvv)
  • Dry run - executing up or down migrations without real executing queries. Command just prints queries which will be executed in non-dry mode
  • Add an autoincrement primary column to an existing table
  • Dump command for creating migration from existing database
  • Diff command for creating diff migration from two existing databases
  • Test command for testing new migration executing migrate, rollback, migrate
  • Status command that shows list of executed migrations and list of migrations to execute
  • json output format for all commands
  • Namespaces in migration classes
  • Own migration templates
  • Easy integration to any PHP application
  • PHPStorm suggestions (works even better with deep-assoc-completion plugin)
  • Change collation for all existing tables and columns
  • Turn foreign keys check on / off in migration
  • Simple autowiring in migrations

Supported adapters

  • MySql
  • PostgreSQL

Installation

Composer

This library requires PHP 7.1 or later (7.2, 7.3, 7.4). It works also on PHP 8.0 and should work on PHP 8.1 too. The fastest and recommended way to install Phoenix is to add it to your project using Composer (https://getcomposer.org/).

composer require lulco/phoenix

Usage

Create configuration file

Create file phoenix.php in the root directory of your project. For example:

<?php

return [
    'migration_dirs' => [
        'first' => __DIR__ . '/../first_dir',
        'second' => __DIR__ . '/../second_dir',
    ],
    'environments' => [
        'local' => [
            'adapter' => 'mysql',
            'host' => 'localhost',
            'port' => 3306, // optional
            'username' => 'user',
            'password' => 'pass',
            'db_name' => 'my_db',
            'charset' => 'utf8',
        ],
        'production' => [
            'adapter' => 'mysql',
            'host' => 'production_host',
            'port' => 3306, // optional
            'username' => 'user',
            'password' => 'pass',
            'db_name' => 'my_production_db',
            'charset' => 'utf8',
        ],
    ],
    'default_environment' => 'local',
    'log_table_name' => 'phoenix_log',
];

Read more about configuration here.

REMEMBER: migrations do some structure changes to the database, therefore the database user used for these migrations has to be able to do these changes.

Commands

To run commands, use command runner vendor/bin/phoenix or vendor/lulco/phoenix/bin/phoenix.

Available commands:
  • init - initialize phoenix
  • create - create migration
  • migrate - run migrations
  • rollback - rollback migrations
  • dump - create migration from existing database
  • status - list of migrations already executed and list of migrations to execute
  • test - test next migration by executing migrate, rollback, migrate for it
  • cleanup - rollback all migrations and delete log table

You can run each command with --help option to get more information about it or read more here

Init command

Command php vendor/bin/phoenix init initializes phoenix and creates database table where executed migrations will be stored in. This command is executed automatically with first run of other commands, so you don't have to run it manually.

Create first migration

Create command php vendor/bin/phoenix create <migration> [<dir>]

php vendor/bin/phoenix create "FirstDir\MyFirstMigration" second

This will create PHP class FirstDir\MyFirstMigration in file named {timestamp}_my_first_migration.php where {timestamp} represents actual timestamp in format YmdHis e.g. 20160919082117. This file will be created in migration directory second which is configured as __DIR__ . '/../second_dir' (see configuration example above).

create command creates a skeleton of migration file, which looks like this:

<?php

namespace FirstDir;

use Phoenix\Migration\AbstractMigration;

class MyFirstMigration extends AbstractMigration
{
    protected function up(): void
    {
        
    }

    protected function down(): void
    {
        
    }
}

Now you need to implement both methods: up(), which is used when command migrate is executed and down(), which is used when command rollback is executed. In general: if you create table in up() method, you have to drop this table in down() method and vice versa.

Let say you need to execute this query:

CREATE TABLE `first_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  `sorting` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_first_table_url` (`url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

You need to implement up() method in your migration class as below:

<?php

namespace FirstDir;

use Phoenix\Database\Element\Index;
use Phoenix\Migration\AbstractMigration;

class MyFirstMigration extends AbstractMigration
{
    protected function up(): void
    {
        $this->table('first_table')
            ->addColumn('title', 'string')
            ->addColumn('url', 'string')
            ->addColumn('sorting', 'integer')
            ->addColumn('created_at', 'datetime')
            ->addIndex('url', Index::TYPE_UNIQUE)
            ->create();
    }
}

Or you can use raw sql:

<?php

namespace FirstDir;

use Phoenix\Migration\AbstractMigration;

class MyFirstMigration extends AbstractMigration
{
    protected function up(): void
    {
        $this->execute('CREATE TABLE `first_table` (
                `id` int(11) NOT NULL AUTO_INCREMENT,
                `title` varchar(255) NOT NULL,
                `url` varchar(255) NOT NULL,
                `sorting` int(11) NOT NULL,
                `created_at` datetime NOT NULL,
                PRIMARY KEY (`id`),
                UNIQUE KEY `idx_first_table_url` (`url`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;'
        );
    }
}

Implementation of correspondent down() method which drops table first_table looks like below:

    protected function down(): void
    {
        $this->table('first_table')
            ->drop();
    }

Now you can run migrate command to execute your first migration.

Migrate command

Migrate command php vendor/bin/phoenix migrate executes all available migrations. In this case you will see output like this:

php vendor/bin/phoenix migrate

Migration FirstDir\MyFirstMigration executing
Migration FirstDir\MyFirstMigration executed. Took 0.0308s

All done. Took 0.0786s

If you run this command again, there will be no migrations to execute, so the output looks like this:

php vendor/bin/phoenix migrate

Nothing to migrate

All done. Took 0.0451s

If you want to rollback changes (e.g. you found out that you forgot add some column or index), you can run rollback command, update migration and then run migrate command again. Keep in mind that the best practice is to run rollback command before updating migration code.

Rollback command

Rollback command php vendor/bin/phoenix rollback rollbacks last executed migration. In this case you will see output like this:

php vendor/bin/phoenix rollback

Rollback for migration FirstDir\MyFirstMigration executing
Rollback for migration FirstDir\MyFirstMigration executed. Took 0.0108s

All done. Took 0.0594s

If you run this command again, there will be no migrations to rollback, so the output looks like this:

php vendor/bin/phoenix rollback

Nothing to rollback

All done. Took 0.0401s

Dump command

Command php vendor/bin/phoenix dump dumps actual database structure into migration file. If you don't use Phoenix yet and you have some tables in your database, this command helps you to start using Phoenix easier.

Diff command

Command php vendor/bin/phoenix diff creates migration as diff of two existing database structures. This command can be used when upgrading some system to newer version and you know the structure of both old and new version.

Status command

Run php vendor/bin/phoenix status and show list of migrations already executed and list of migrations to execute. Output is like this:

Executed migrations
+--------------------+---------------------------------------------+---------------------+
| Migration datetime | Class name                                  | Executed at         |
+--------------------+---------------------------------------------+---------------------+
| 20160919082117     | FirstDir\MyFirstMigration                   | 2016-09-26 06:49:49 |
+--------------------+---------------------------------------------+---------------------+

Migrations to execute
+--------------------+---------------------------------+
| Migration datetime | Class name                      |
+--------------------+---------------------------------+
| 20160921183201     | FirstDir\MySecondMigration      |
+--------------------+---------------------------------+

All done. Took 0.2016s

Cleanup command

Cleanup command php vendor/bin/phoenix cleanup rollbacks all executed migrations and delete log table. After executing this command, the application is in state as before executing init command.

php bin/phoenix cleanup

Rollback for migration FirstDir\MyFirstMigration executed

Phoenix cleaned

Test command

Test command php vendor/bin/phoenix test executes first next migration, then run rollback and migrate first migration again. This command is shortcut for executing commands:

php bin/phoenix migrate --first
php bin/phoenix rollback
php bin/phoenix migrate --first

Output looks like this:

php bin/phoenix test
Test started...

Migration FirstDir\MyFirstMigration executing...
Migration FirstDir\MyFirstMigration executed. Took 0.0456s

Rollback for migration FirstDir\MyFirstMigration executing...
Rollback for migration FirstDir\MyFirstMigration executed. Took 0.0105s

Migration FirstDir\MyFirstMigration executing...
Migration FirstDir\MyFirstMigration executed. Took 0.0378s

Test finished successfully

All done. Took 0.2840s

Read more about commands here

Comments
  • Removes some final keywords from AbstractMigration

    Removes some final keywords from AbstractMigration

    This is simplies solution to add some extra logic by extending some AbstractMigration methods.

    I think this is more elegant solution for solving use cases like #207 tried to achieve by reusing some external connection just for adding when needed automatically prefixes to tables.

    opened by MekDrop 13
  • Added Bit-Value Type - BIT

    Added Bit-Value Type - BIT

    I'm using MySQL 5.7 and my table has a bit type field. While executing the dump, I encountered the "Type" bit "is not allowed" error. I decided to fix this by adding processing for this type of field. The BIT data type is used to store bit values. A type of BIT(M) enables storage of M-bit values. M can range from 1 to 64. To specify bit values, b'value' notation can be used. value is a binary value written using zeros and ones. https://dev.mysql.com/doc/refman/5.6/en/bit-type.html

    opened by fishus 11
  • Add operator to column name

    Add operator to column name

    Here you can specify the operator in the keys of $conditions array right after the column name, separated by a space character.

    It will be converted to the correct operator based on the condition value.

    If value is NULL:

    • 'column =' => `column` IS NULL
    • 'column !=' => `column` IS NOT NULL
    • 'column <>' => `column` IS NOT NULL
    • any other operator will throw an UnexpectedValueException

    If value is an array:

    • 'column =' => `column` IN (...)
    • 'column !=' => `column` NOT IN (...)
    • 'column <>' => `column` NOT IN (...)
    • any other operator will throw an UnexpectedValueException

    If anything else it will be kept as is, except for != that will always be converted to <>.

    The column name will always be trimmed, so it won't ever have trailing or leading spaces.

    Any space character is mandatory between column name and operator

    opened by Kal-Aster 9
  • Access container from migration

    Access container from migration

    I need to get table prefix for name and to do that I need somehow access services container. How to do that? With Doctrine migration that would look like this -> https://gist.github.com/chalasr/dc5cd628c9d16e255d4e2ea7b2f36b72

    opened by MekDrop 8
  • Can't fetchAll where column IS [NOT] NULL

    Can't fetchAll where column IS [NOT] NULL

    Hi, I think the title says all.

    In the functions AbstractMigration::fetch and ::fetchAll as well in Adapter::fetch and ::fetchAll there isn't the argument where but nly conditions, so it's not possible to specify a where clause like column IS NOT NULL, because saying [ 'column' => 'NOT NULL' ] as condition will result in column = NOT NULL which is not what I need

    opened by Kal-Aster 7
  • Type

    Type "year" is not allowed - valid MySQL column type

    Run vendor/bin/phoenix dump on a database with a MySQL table with a Year column.

    More about the Year column type: https://dev.mysql.com/doc/refman/5.7/en/year.html

    Can someone add a TYPE_YEAR? I'm not familiar enough with this library to know where else might need to use it other than Column.php.

    opened by JohnWE 6
  • Adds possibility to use existing database connection (based on PDO)

    Adds possibility to use existing database connection (based on PDO)

    This pull request implements idea from #206 comments. From now is possible with PHP based configuration reuse existing database connection with 'connection' parameter and get access to it from migration.

    For example, such configuration now is possible:

    <?php
    
    $connection = new \PDO();
    
    return [
        'migration_dirs' => [
            'phoenix' => __DIR__ . '/../testing_migrations/phoenix',
        ],
        'environments' => [
            'mysql' => [
                'adapter' => 'mysql',
                'connection' => $connection,
            ]
        ],
    ];
    

    If connection is not type of PDO instance other configuration options will be used. So, all old configurations should work fine.

    And this is example how is possible to access database connection from migration:

    <?php
    
    namespace Phoenix\DemoMigrations;
    
    use Phoenix\Migration\AbstractMigration;
    
    class DoSomethingFancyWithDatabaseConnection extends AbstractMigration
    {
        public function up(): void
        {
            $connection = $this->getConnection();
            // and here we can do something with this database connection (f.e. prefixing tables as needed)
        }
    
        public function down(): void
        {
            $connection = $this->getConnection();
            // and here we can do something with this database connection (f.e. prefixing tables as needed)
        }
    }
    
    opened by MekDrop 6
  • Using phoenix.yml file causes `Class Symfony\...\Yaml doesn't exist. Run composer require symfony/yaml`

    Using phoenix.yml file causes `Class Symfony\...\Yaml doesn't exist. Run composer require symfony/yaml`

    If I want to use a .yml file for configuration I get Class Symfony\...\Yaml doesn't exist. Run composer require symfony/yaml.

    I've seen it's in the suggests section in composer.json but is't that section meant for packages that improve behaviour rather than 'optional' ones?

    I've found no way to install this and the code breaks, I want to suggest putting this in the require section.

    opened by rvrbk 5
  • ROW_FORMAT

    ROW_FORMAT

    Hello,

    Would you be able to implement ROW_FORMAT?

    I know that I can include it when using raw sql, but it would be nice to have this in the created dumps, etc.

    Thank you

    opened by darkalchemy 4
  • Dump MySQL Tinyint column changes

    Dump MySQL Tinyint column changes

    I encountered two issues where dump didn't properly convert a Tinyint(1) column.

    1. A column with a default that's not 0 or 1. In MySQL, Tinyint columns can range from -127 to 128 or 0 to 255 if unsigned. A column like this:

    num_endorsements_to_publish TINYINT(1) UNSIGNED NOT NULL DEFAULT 3,

    gets dumped as:

    ->addColumn('num_endorsements_to_publish', 'boolean', ['default' => true, 'signed' => false])

    missing the proper default value.

    1. A column with a null default:

    approved TINYINT(1) UNSIGNED DEFAULT NULL COMMENT 'Whether this request was approved or rejected or not touched yet',

    gets dumped as:

    ->addColumn('approved', 'boolean', ['null' => true, 'default' => false, 'signed' => false, 'comment' => 'Whether this request was approved or rejected or not touched yet'])

    where the default should be null.

    Maybe those would be fixed by the same code change? I appreciate dump checking for a boolean column, but maybe it could exempt the times when the default is not 0 or 1 and keep it as a tinyinteger type?

    opened by JohnWE 4
  • Fixed bug unescaped column value. 'b'0'' -> 'b\'0\''

    Fixed bug unescaped column value. 'b'0'' -> 'b\'0\''

    While doing the dump, I noticed a syntax error in the resulting file. In the value of a field of type bit, quotes in the value were not escaped. This fixes this bug.

    opened by fishus 4
  • Update Option is not allowed and Docs suggestion

    Update Option is not allowed and Docs suggestion

    Hi, I am new to using Phoenix, and have implemented it for some of our systems. We have a field called "updated_at" with a default field of "CURRENT_TIMESTAMP" and an "ON UPDATE" of "CURRENT_TIMESTAMP" aswell. I am getting an error "Setting 'update' is not allowed.".

    The code I used was this

    $this->table("awards")
          ->addColumn('id', 'integer', ['autoincrement' => true])
          ->addColumn('name', 'longtext', ['null' => true])
          ->addColumn('shortName', 'string', ['null' => true, 'length' => 50])
          ->addColumn('typeExpiry', 'integer', ['default' => 0])
          ->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP'])
          ->addColumn('updated_at', 'timestamp', ['default' => "CURRENT_TIMESTAMP", 'update' => "CURRENT_TIMESTAMP"])
          ->addColumn('hidden_at', 'timestamp', ['null' => true])
          ->create();
    

    I also struggled to find out what the option for this even was. I could not find any documentation around the different options that are available for fields. I did however see that this was following Phinx quite closely and assumed that those docs might work. I think if this is supposed to replace phinx, it either should have the docs of what options are supported, or support all of phinx's options and just have a link to their documentation so people don't get lost/confused to what the syntax is etc.

    Appreciate any help

    opened by Declan-Watts 3
  • Diff command not working if one of structures is generated from migrations

    Diff command not working if one of structures is generated from migrations

    It generates several errors (notices):

    • [ ] Undefined index: phoenix_log in /var/www/provys/vendor/lulco/phoenix/src/Database/Element/Structure.php on line 31
    • [ ] Undefined index: after in /var/www/provys/vendor/lulco/phoenix/src/Dumper/Dumper.php on line 229

    It also creates Diff with all fields changed, not only those which are changed for real

    bug 
    opened by lulco 2
  • Support for views

    Support for views

    ideally structured use like in tables:

    $this->view('view_name')->columns(['list of columns'])->select() etc.
    
    • [x] create view
    • [x] update (replace) view
    • [x] drop view
    • [ ] rename view
    • [ ] dump view
    • [ ] tests
    • [ ] documentation about views
    pgsql mysql feature 
    opened by lulco 1
Releases(2.3.0)
  • 2.3.0(Nov 8, 2022)

  • 2.2.0(Nov 8, 2022)

  • 2.1.0(Apr 14, 2022)

  • 2.0.0(Jan 24, 2022)

    Changed

    • use utf8mb4 as default charset for mysql (fix but BC break, use e.g. $this->changeCollation('utf8mb4_general_ci') to change all tables and fields to it)
    • dropped support for unsupported PHP versions and added native typehints (BC break)
    • changed autoload to PSR-4
      • moved namespace Dumper to Phoenix\Dumper (BC break)
      • moved namespace Comparator to Phoenix\Comparator (BC break)
    • added declare(strict_types=1); to all classes
    • all classes which can be final are final (BC break if there are some extensions)
    • all methods which can be final are final
    • moved default command names from configure to __construct

    Removed

    • class MysqlWithJsonQueryBuilder (BC break)
    • method setName from AbstractCommand (BC break - if setName() is called after name is already set, it will be changed)
    • dropped support symfony libs (console, finder and yaml) 3.x and 4.x (BC break)

    Added

    • visibility for constants
    • support for symfony libs (console, finder and yaml) 6.x
    Source code(tar.gz)
    Source code(zip)
  • 1.12.0(Jan 7, 2022)

  • 1.11.1(Dec 10, 2021)

  • 1.11.0(Dec 6, 2021)

  • 1.10.0(Aug 23, 2021)

  • 1.9.1(Aug 23, 2021)

  • 1.9.0(Aug 5, 2021)

  • 1.8.0(Jun 1, 2021)

    Added

    • year column type (year for mysql, numeric(4) for pgsql)
    • new options add-table-exists-check and auto-increment to Dumper command
    • documentation for primary keys
    • step by step tutorial for using dump command to change mysql to pgsql or vice versa

    Fixed

    • single quotes in comments
    • table comment in dump
    • transfer tinyint(1) to boolean in mysql only if it has default values 1 or 0
    • dump command skip everything which is not of type "BASE TABLE" (VIEW, SYSTEM VIEW etc.)
    • dumping special values (null, true, false, strings with apostrophe)
    Source code(tar.gz)
    Source code(zip)
  • 1.7.0(Apr 14, 2021)

  • 1.6.0(Apr 3, 2021)

  • 1.5.0(Jan 25, 2021)

    Changed

    • moved tests from travis to github actions and removed scrutinizer
    • improved code applying phpstan

    Added

    • support to change collation on all existing tables and columns
    • support for turn on / off checking foreign keys in migration
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Dec 1, 2020)

    Changed

    • default value of boolean columns is set to false if it is not null (this prevent from errors when user forgot set default to false)
    • better organized docs

    Added

    • support for PHP 8.0
      • $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
    • set autoincrement for new table and also for existing table

    Fixed

    • escape string in QueryBuilderInterface
    Source code(tar.gz)
    Source code(zip)
  • 1.3.0(Apr 16, 2020)

    Added

    • method renameColumn() to migrations
    • PHPStorm meta for better suggestions
    • migration datetime to json output of migrate / rollback commands for future purpose
    • smallserial as primary in pqsql
    • method truncate() to migrations
    • settings order and length to index columns
    • DiffCommand for creating migration from diff of two databases or migration and database
    • target option for migrate and rollback commands

    Changed

    • unfreezed symfony/console and added versions 3.4.31 and 4.3.4 to conflict
    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(Apr 11, 2020)

    Changed

    • changed comparation == to === and added strict parameter to in_array

    Added

    • support for CURRENT_TIMESTAMP for columns with type timestamp
    • support for json column type for newer versions of mysql (>= 5.7.8) (To keep using text instead of json, force version in config)

    Fixed

    • tests on travis
    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Apr 11, 2020)

  • 1.1.0(Feb 11, 2019)

  • 1.0.0(Jun 19, 2018)

    Changed

    • added return type (:void) for up() and down() methods in AbstractMigration (BC Break - Fix: add return type :void to all migrations)
    • replaced nette/finder with symfony/finder
    • PDOAdapter::execute splitted into PDOAdapter::execute(PDOStatement $sql) and PDOAdapter::query(string $sql)

    Removed

    • removed support for sqlite adapter
    • removed nette/utils

    Fixed

    • Typehint for fetch method
    Source code(tar.gz)
    Source code(zip)
  • 0.13.0(Mar 14, 2018)

    Changed

    • second parameter of methods fetchAll and fetch string $fields = '*' has been changed to array $fields = ['*'] (BC Break - fix: change string to array)

    Added

    • methods tableExists, tableColumnExists and getTable to migration
    • posibility to add an autoincrement primary key on an existing table
    Source code(tar.gz)
    Source code(zip)
  • 0.12.0(Dec 6, 2017)

    Changed

    • dropped support for PHP 5.6, PHP 7.0 and hhvm
    • dropped support for symfony/console ^2.8 and added support for symfony/console ^4.0 and symfony/yaml ^4.0
    • added typehints

    notice: up() and down() methods are without return typehints for now, but they will be added in version 1.0.0 change up() to up(): void and down() to down(): void now for easier upgrade to version 1.0.0

    Source code(tar.gz)
    Source code(zip)
  • 0.11.0(Dec 1, 2017)

    Added

    • option to execute all migrations from selected directory(-ies) in migrate and rollback command
    • option to execute migrations via classname(s) in migrate and rollback command
    • TestCommand to test next migration via migrate-rollback-migrate(-rollback)
    Source code(tar.gz)
    Source code(zip)
  • 0.10.0(Oct 1, 2017)

    Added

    • method copyTable for copy table structure, data or both
    • interactive choice of migration dirs in CreateCommand
    • comment for table
    • comment for column
    • PHP 7.2 compatibility

    Fixed

    • ucfirst for lowercase named migrations
    Source code(tar.gz)
    Source code(zip)
  • 0.9.1(Jun 7, 2017)

  • 0.9.0(Jun 7, 2017)

    Changed

    • default action for migration table is now alter instead of create - possible BC, use ->create() for new tables

    Added

    • dump command for creating migration from existing database
    • structure introduced - all migrations are checked against actual database structure - possible BC if unknown column types are used

    Fixed

    • command options config, config_type, template and indent require value
    • typehints in MigrationTable
    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Jun 6, 2017)

Owner
Michal Lulco
Michal Lulco
PHP Database Migrations for Everyone

Phinx: Simple PHP Database Migrations Intro Phinx makes it ridiculously easy to manage the database migrations for your PHP app. In less than 5 minute

CakePHP 4.3k Jan 7, 2023
Simple migrations system for php

Phpmig What is it? Phpmig is a (database) migration tool for php, that should be adaptable for use with most PHP 5.3+ projects. It's kind of like doct

Dave Marshall 561 Jan 1, 2023
php 5.3 Migration Manager

#What are Database Migrations? Migrations are a convenient way for you to alter your database in a structured and organized manner. You could edit fra

Lewis Dyer 38 Sep 28, 2022
Database migrations for PHP ala ActiveRecord Migrations with support for MySQL, Postgres, SQLite

Introduction Ruckusing is a framework written in PHP5 for generating and managing a set of "database migrations". Database migrations are declarative

Cody Caughlan 506 Nov 17, 2022
Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.

Laravel Migrations Generator Generate Laravel Migrations from an existing database, including indexes and foreign keys! Upgrading to Laravel 5.4 Pleas

Bernhard Breytenbach 3.3k Dec 30, 2022
Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.

Laravel Migrations Generator Generate Laravel Migrations from an existing database, including indexes and foreign keys! This package is cloned from ht

Kit Loong 1.4k Jan 1, 2023
A Simple MVC PHP Framework, integrated with lot of features such as Session, Cookies, Migrations, Database, Factories, Seeding, Bootstrap and Tailwind CSS

Navite A Simple MVC PHP Framework, integrated with lot of features such as Session, Cookies, Migrations, Database, Factories, Seeding, Bootstrap and T

Celionatti 2 Aug 22, 2022
This package provides a framework-agnostic database backup manager for dumping to and restoring databases from S3, Dropbox, FTP, SFTP, and Rackspace Cloud

Database Backup Manager This package provides a framework-agnostic database backup manager for dumping to and restoring databases from S3, Dropbox, FT

Backup Manager 1.6k Dec 23, 2022
php database agnostic authentication library for php developers

Whoo Whoo is a database agnostic authentication library to manage authentication operation easily. Whoo provides you a layer to access and manage user

Yunus Emre Bulut 9 Jan 15, 2022
While BotMan itself is framework agnostic, BotMan is also available as a bundle with the great Laravel PHP framework.

BotMan Studio About BotMan Studio While BotMan itself is framework agnostic, BotMan is also available as a bundle with the great Laravel PHP framework

BotMan 322 Dec 26, 2022
PHP Database Migrations for Everyone

Phinx: Simple PHP Database Migrations Intro Phinx makes it ridiculously easy to manage the database migrations for your PHP app. In less than 5 minute

CakePHP 4.3k Jan 7, 2023
PHP Database Migrations for Everyone

Phinx: Simple PHP Database Migrations Intro Phinx makes it ridiculously easy to manage the database migrations for your PHP app. In less than 5 minute

CakePHP 4.3k Jan 7, 2023
Validate PHP database migration files for compliance with best practices. Ensure db migrations are irreversible.

PHP DB Migration Validator Introduction In modern PHP frameworks such as Symfony and Laravel, migrations usually have up and down methods. In up metho

Anton Komarev 17 Dec 14, 2022
Generate migrations from existing database structures

Laravel Migration Generator Generate migrations from existing database structures, an alternative to the schema dump provided by Laravel. A primary us

Bennett Treptow 404 Jan 1, 2023
The MX_PhinxMigrations module integrates Phinx database migrations into Magento 2

MX Phinx Migrations About The MX_PhinxMigrations module integrates Phinx database migrations into Magento 2 as a replacement for the built-in setup:up

Inviqa 34 Jul 30, 2021
Declare database migrations and factory definitions inside Laravel models.

Lucid This package allows you to declare database migrations and factory definitions inside of your Laravel models. Running the lucid:migrate command

null 23 Jul 9, 2022
Laravel ClickHouse adds CH client integration, generation & execution of ClickHouse database migrations to the Laravel application.

Laravel ClickHouse Introduction Laravel ClickHouse database integration. This package includes generation and execution of the ClickHouse database mig

cybercog 11 Dec 20, 2022
A framework agnostic, multi-gateway payment processing library for PHP 5.6+

Omnipay An easy to use, consistent payment processing library for PHP Omnipay is a payment processing library for PHP. It has been designed based on i

The League of Extraordinary Packages 5.7k Jan 4, 2023
A framework agnostic PHP library to build chat bots

BotMan If you want to learn how to create reusable PHP packages yourself, take a look at my upcoming PHP Package Development video course. About BotMa

BotMan 5.8k Jan 3, 2023
A framework agnostic PHP library to build chat bots

BotMan If you want to learn how to create reusable PHP packages yourself, take a look at my upcoming PHP Package Development video course. About BotMa

BotMan 5.8k Jan 1, 2023