Skip to content

Commit

Permalink
Fixed issue #12775: The installation command needs to be updated to u…
Browse files Browse the repository at this point in the history
…se PHP instead of create-xxx.sql
  • Loading branch information
olleharstedt committed Oct 13, 2017
1 parent e8015b3 commit 04f56ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/commands/InstallCommand.php
Expand Up @@ -58,7 +58,11 @@ public function run($sArgument)
default:
throw new Exception(sprintf('Unknown database type "%s".', $this->connection->driverName));
}
$this->_executeSQLFile(dirname(Yii::app()->basePath).'/installer/sql/create-'.$sql_file.'.sql');

$sFileName = dirname(APPPATH).'/installer/php/create-database.php';
require_once($sFileName);
createDatabase($this->connection);

$this->connection->createCommand()->insert($this->connection->tablePrefix.'users', array(
'users_name'=>$sArgument[0],
'password'=>hash('sha256',$sArgument[1]),
Expand Down

0 comments on commit 04f56ef

Please sign in to comment.