From a0aa528273477971422b411010e0c8ed55b5c60b Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Mon, 19 Nov 2018 16:03:41 +0300 Subject: [PATCH 1/2] add info about add migrations with namespaces --- readme.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index 0f8f038..c3e1fc3 100644 --- a/readme.md +++ b/readme.md @@ -43,16 +43,28 @@ to the require section of your `composer.json` file. ## Usage ### Prepare -Add migration to create table for images: +Add migration namespace for your console application config to create table for images +(add the following lines to the file `%PROJECT_DIR%/console/config/main.php`): ```php -class m150318_154933_gallery_ext - extends zxbodya\yii2\galleryManager\migrations\m140930_003227_gallery_manager -{ - -} +return [ + // ... + 'controllerMap' => [ + 'migrate' => [ + 'class' => \yii\console\controllers\MigrateController::class, + 'migrationNamespaces' => [ + 'zxbodya\yii2\galleryManager\migrations', + ], + 'migrationPath' => [ + '@app/migrations', + ], + ], + ], + // ... +]; ``` -Or better - copy migration to you application(but be sure to **remove namespace from it** - it should be in global namespace) + +Now we should run `yii migrate/up` command for apply all widget migrations. ### Add configurations for upload and store images From 129d1e2b6810b0ba50e4fd3e80d0bbfc81824b23 Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Mon, 19 Nov 2018 16:08:32 +0300 Subject: [PATCH 2/2] add line to changelog --- changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.md b/changelog.md index 43523b7..9cdc3e6 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Gallery manaager extension changelog +Nov 19, 2018 + - Use migrations config from `console/config/main.php` instead of create migration directly + Apr 3, 2015 - Added possibility to change table name for gallery images