title: Create PostGreSQL schema and add tables
body: <p>I want to make graphic installer that asks user few questions and then creates schema and populates it with tables. I Will use <a href="http://www.yiiframework.com/doc-2.0/yii-db-command.html#createTable()-detail" rel="nofollow noreferrer">yii\db\Command's createTable()</a> to create tables but I wonder how can I add new schema to the database before connecting to add tables.</p>
  
  <p>I was thinking about Postgresql's <a href="https://www.postgresql.org/docs/9.3/static/sql-createschema.html" rel="nofollow noreferrer">Create schema</a> that I will run as raw command to DAO something like </p>
  
  <pre><code>Yii::$app-&gt;db-&gt;createCommand('CREATE SCHEMA schema_name')-&gt;execute();
  </code></pre>
  
  <p>but am not sure if it will work given <code>Yii::$app-&gt;db</code> is connected in another schema and I'm not Postgresql expert.</p>
  
  <p>So I need help to know if that will work or even if there is a better way to solve my problem. </p>