Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readme migration namespace #71

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Gallery manaager extension changelog

Nov 19, 2018
- Use migrations config from `console/config/main.php` instead of create migration directly

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, changelog should more about important changes in package itself… and readme update does not look to belong here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course.
Change it as you wish.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readme.md will be improve. Will add different way for apply migrations. This changes should be reflected for existing users who already use old way.

Apr 3, 2015
- Added possibility to change table name for gallery images

Expand Down
26 changes: 19 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down