We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

SQL migrations

Hey, just created simple SQL migrations for Phalcon if somebody prefers this method of database migrations.

Feel free to use https://github.com/davihu/phalcon-ext

Sample migration example

use PhalconExt\Db\SqlMigrations\AbstractMigration;

class Migration160910160944 extends AbstractMigration
{
    public function up()
    {
        $this->addSql("ALTER TABLE robots ADD COLUMN number VARCHAR(20)");
        $this->addSql("...");
    }

    public function down()
    {
        $this->addSql("ALTER TABLE robots DROP COLUMN number");
        $this->addSql("...");
    }
}


85.5k

nice man !

Wonderful work