Fix #18676: Added method yii\helpers\BaseFileHelper::changeOwnership() and properties newFileMode/newFileOwnership in yii\console\controllers\BaseMigrateController

Co-authored-by: Bizley <pawel@positive.codes>
This commit is contained in:
rhertogh
2021-05-30 18:26:15 +02:00
committed by GitHub
parent 68691eb0d7
commit 31ca0fcb6f
5 changed files with 420 additions and 0 deletions

View File

@ -187,6 +187,22 @@ class m150101_185401_create_news_table extends Migration
A list of all available methods for defining the column types is available in the API documentation of [[yii\db\SchemaBuilderTrait]].
> Info: The generated file permissions and ownership will be determined by the current environment. This might lead to
inaccessible files. This could, for example, happen when the migration is created within a docker container
and the files are edited on the host. In this case the `newFileMode` and/or `newFileOwnership` of the MigrateController
can be changed. E.g. in the application config:
```php
<?php
return [
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'newFileOwnership' => '1000:1000', # Default WSL user id
'newFileMode' => 0660,
],
],
];
```
## Generating Migrations <span id="generating-migrations"></span>