markei / doctrinemigrationwebbundle
Symfony Bundle 用于运行 Doctrine 迁移,从网页端迁移(如果您的网页托管不支持 CLI)
v1.0.0
2016-03-07 20:29 UTC
Requires
- php: >=5.5.0
- doctrine/doctrine-migrations-bundle: ^1.1
- symfony/symfony: 3.0.*
This package is auto-updated.
Last update: 2024-09-13 10:55:53 UTC
README
关于此包
此包提供了 Doctrine 迁移命令,在控制器/web 设置中运行。
安装
1 将以下内容添加到 composer.json 文件的 require
键
$composer require markei/doctrinemigrationwebbundle
2 在 app/AppKernel.php
中注册该包
$bundles = array( // ... new Markei\DoctrineMigrationWebBundle\MarkeiDoctrineMigrationWebBundle(), );
3 配置您的路由 app/config/routing.php
,更改前缀为喜欢的名称
markei_doctrine_migration_web: resource: "@MarkeiDoctrineMigrationWebBundle/Controller/" type: annotation prefix: /migration
4 配置您定义的前缀的安全性 https://symfony.com.cn/doc/current/book/security.html
5 配置 Doctrine Migrations https://symfony.com.cn/doc/current/bundles/DoctrineMigrationsBundle/index.html
6 访问页面 http://my-site/migration 并按照说明操作
配置
通过 app/config/routing.yml
配置前缀
通过 app/config/config.yml
配置通用的 Doctrine Migrations 设置
通过 app/config/config.yml
中的 doctrine 部分配置数据库连接
通过 app/config/security.yml
配置安全性