occ2/phinx-nette-bridge

此软件包最新版本(v0.3)没有可用的许可信息。

Phinx 扩展,用于迁移到 Nette 框架

v0.3 2018-12-09 20:38 UTC

This package is not auto-updated.

Last update: 2024-09-24 05:35:19 UTC


README

Downloads this Month License

小型扩展,用于将基本命令集成到 contributte/console 以支持 Nette 框架。

要求

安装

  1. composer require occ2/phinx-nette-bridge
  2. 注册 DI 扩展
extensions:
    phinx: occ2\Phinx\DI\PhinxExtension

配置

phinx:
    paths:
        migrations: "./db/migrations"
    default_migration_table: phinxlog
    environments:
        development:
            adapter: mysql
            host: 'localhost'
            name: db_name
            user: root
            pass: '123456'
            port: 3306
            charset: utf8
    version_order: creation

用法

{PATH_TO_CONSOLE} phinx:migrate 
{PATH_TO_CONSOLE} phinx:create 
{PATH_TO_CONSOLE} phinx:rollback 
{PATH_TO_CONSOLE} phinx:status
{PATH_TO_CONSOLE} phinx:breakpoint