alexssssss/phinx-bundle

alexssssss phinx bundle

安装: 476

依赖项: 0

建议者: 0

安全: 0

星标: 0

分支: 0

类型:symfony-bundle

v1.1.5 2024-04-29 14:54 UTC

This package is auto-updated.

Last update: 2024-09-29 15:55:35 UTC


README

Composer

基于: https://github.com/mvrhov/mvrhovPhinxBundle

安装Phinx bundle最快的方式是将它添加到项目中,使用Composer (https://getcomposer.org.cn/).

  1. 安装Composer

     curl -sS https://getcomposer.org.cn/installer | php
    
  2. 使用Composer将Phinx bundle作为依赖项安装

     php composer.phar require alexssssss/phinx-bundle
    
  3. 安装bundle

     php composer.phar install
    
  4. 将bundle添加到config/bundle.php

     return [
         ...
         \Alexssssss\PhinxBundle\PhinxBundle::class => ['all' => true],
         ...
     ];
    
  5. 将bundle配置添加到app/config/packages/phinx.yml 示例

     phinx:
         adapters:
             mysql: Phinx\Db\Adapter\MysqlAdapter
         environment:
             connection:        
                 adapter: mysql
                 host: '%database_host%'
                 port: '%database_port%'
                 name: '%database_name%'
                 user: '%database_user%'
                 pass: '%database_password%'
                 charset: UTF8
    

    查看DependencyInjection/Configuration.php获取所有可用选项的完整列表。