Comments (2)
Тут проблема не в расширении. На данный момент yii2 предлагает два способа настроить миграции для своих приложений. Первый, когда путь к миграциям указывается через migrationPath
, и, при этом, классы миграций должны находиться в корневом неймспейсе. Второй, который доступен начиная с 2.0.10, дает возможность настроить несколько источников через migrationNamespaces
, но он требует чтобы и миграции находились в неймспейсах.
Я выбрал второй. Он лучше подходит для оформления миграций на стороне расширения. В приложении конфиг для нескольких источников может выглядеть так:
'controllerMap' => [
'migrate' => [
'class' => \yii\console\controllers\MigrateController::class,
'migrationPath' => null,
'migrationNamespaces' => [
'app\migrations',
'zhuravljov\yii\queue\db\migrations',
],
],
],
Если вы у себя в проекте используете migrationPath
, то решить вопрос можно через наследование. На каждую миграцию расширения нужно создать свою:
class m161119_140200_queue extends \zhuravljov\yii\queue\db\migrations\M161119140200Queue {}
from yii2-queue.
Спасибо! Не знал, буду использовать второй вариант теперь 👍
from yii2-queue.
Related Issues (20)
- Fixing the maximum PHP version HOT 9
- update github link
- update docs link
- Can we replace new Process with something like pcntl_fork to optimize queue execution? HOT 3
- update tests folder links
- update root folder links
- Yii version 2.0.10 reports an error when using clientList for Redis in yii queue version 2.0.0 HOT 2
- Ability to work with headers in the rabbitmq driver
- Default TTR from config seems not to be apllied HOT 4
- find no TemporayException HOT 1
- i cant run queue/listen, any configuration ? HOT 1
- Why are environment variables not passed to the created process?! HOT 5
- https://github.com/yiisoft/yii2-queue/pull/464/files is merged 2.3.6 HOT 1
- M211218163000JobQueueSize DB driver migration not using tableName property HOT 1
- Summary of version 3.0
- Before save & QUEUE redis driver
- How to get a job details from job ID and run that particular queue job ID separtly
- StatisticsProvider for queue
- problem with TTR parameter and AWS SQS queue HOT 2
- Fill `allow-plugins` section in `composer.json` for automatic installation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-queue.