title: Create codeigniter session table automatically
body: <p>How can I create codeigniter session table automatically?
  When I use creator function in my controller constructor and when the session table not exist I see codeigniter error. My code is:</p>
  
  <pre><code>function admin() { 
  parent::__construct();
  ob_start();
  if(!$this-&gt;db-&gt;table_exists('session'))//for `first time` run.
      $this-&gt;utilmodel-&gt;create_session_table(); //this function create session table with CI structure
  ob_end_clean();
  $this-&gt;load-&gt;library('session'); 
  ... 
  }
  </code></pre>
  
  <p>My obviously error is:</p>
  
  <pre><code>Error Number: 1146    
  Table 'dbs.session' doesn't exist
  
  INSERT INTO `session` (`session_id`, `ip_address`, `user_agent`,
  `last_activity`, `user_data`) VALUES
  ('0a78608576684ebc2c0050b8f4810f', '127.0.0.1', 'Mozilla/5.0
  (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0
  AlexaToolbar/alxf-2.21', 1001550875, '')
  
  Filename: C:\wamp\www\folder\system\database\DB_driver.php
  
  Line Number: 330
  </code></pre>
  
  <p>I know exactly after </p>
  
  <pre><code>parent::__construct()
  </code></pre>
  
  <p>my error happens.</p>