- Enh #3643: Improved Mime-Type detection by using the `mime.types` file from apache http project to dected mime types by file extension (cebe, pavel-voronin, trejder)
- Enh #3643: Improved Mime-Type detection by using the `mime.types` file from apache http project to dected mime types by file extension (cebe, pavel-voronin, trejder)
- Enh #3773: Added `FileValidator::mimeTypes` to support validating MIME types of files (Ragazzo)
- Enh #3773: Added `FileValidator::mimeTypes` to support validating MIME types of files (Ragazzo)
- Enh #3774: Added `FileValidator::checkExtensionByMimeType` to support validating file types against file mime-types (Ragazzo)
- Enh #3774: Added `FileValidator::checkExtensionByMimeType` to support validating file types against file mime-types (Ragazzo)
- Enh #3801: Base migration controller `yii\console\controllers\BaseMigrateController` extracted (klimov-paul)
- Enh: Added support for using sub-queries when building a DB query with `IN` condition (qiangxue)
- Enh: Added support for using sub-queries when building a DB query with `IN` condition (qiangxue)
- Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue)
- Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue)
- Enh: Added `yii\web\UrlManager::addRules()` to simplify adding new URL rules (qiangxue)
- Enh: Added `yii\web\UrlManager::addRules()` to simplify adding new URL rules (qiangxue)
thrownewException("The version argument must be either a timestamp (e.g. 101129_185401),\n the full name of a migration (e.g. m101129_185401_create_user_table),\n a UNIX timestamp (e.g. 1392853000), or a datetime string parseable\nby the strtotime() function (e.g. 2014-02-15 13:00:50).");
}
}
/**
* Modifies the migration history to the specified version.
*
* No actual migration will be performed.
*
* ~~~
* yii migrate/mark 101129_185401 # using timestamp
* yii migrate/mark m101129_185401_create_user_table # using full name
* ~~~
*
* @param string $version the version at which the migration history should be marked.
* This can be either the timestamp or the full name of the migration.
* @throws Exception if the version argument is invalid or the version cannot be found.
thrownewException("The version argument must be either a timestamp (e.g. 101129_185401)\nor the full name of a migration (e.g. m101129_185401_create_user_table).");
}
// try mark up
$migrations=$this->getNewMigrations();
foreach($migrationsas$i=>$migration){
if(strpos($migration,$version.'_')===0){
if($this->confirm("Set migration history at $originalVersion?")){
for($j=0;$j<=$i;++$j){
$this->addMigrationHistory($migrations[$j]);
}
echo"The migration history is set at $originalVersion.\nNo actual migration was performed.\n";
thrownewException("The version argument must be either a timestamp (e.g. 101129_185401),\n the full name of a migration (e.g. m101129_185401_create_user_table),\n a UNIX timestamp (e.g. 1392853000), or a datetime string parseable\nby the strtotime() function (e.g. 2014-02-15 13:00:50).");
}
}
/**
* Modifies the migration history to the specified version.
*
* No actual migration will be performed.
*
* ~~~
* yii migrate/mark 101129_185401 # using timestamp
* yii migrate/mark m101129_185401_create_user_table # using full name
* ~~~
*
* @param string $version the version at which the migration history should be marked.
* This can be either the timestamp or the full name of the migration.
* @throws Exception if the version argument is invalid or the version cannot be found.
thrownewException("The version argument must be either a timestamp (e.g. 101129_185401)\nor the full name of a migration (e.g. m101129_185401_create_user_table).");
}
// try mark up
$migrations=$this->getNewMigrations();
foreach($migrationsas$i=>$migration){
if(strpos($migration,$version.'_')===0){
if($this->confirm("Set migration history at $originalVersion?")){
$command=$this->db->createCommand();
for($j=0;$j<=$i;++$j){
$command->insert($this->migrationTable,[
'version'=>$migrations[$j],
'apply_time'=>time(),
])->execute();
}
echo"The migration history is set at $originalVersion.\nNo actual migration was performed.\n";