Question: Hi I'm making a pizza menu based game and I have many objects in my menuCard scene where they have Don't destroy on load attached to it so that I can move them to the next screen but when I want to come back to the menuCard scene I don't want the object which have don't destroy on load attached 

Menu Card => Where all my items are
scene 1 => where I want to move them to next screen.

Answer: 
<https://www.codeigniter.com/user_guide/database/metadata.html>

```
if (count($this->db->list_tables()) == 0) {
    redirect(...);
}

```
I got the desired result this exact way:

In the Posts controller (default): 

```
public function index() {
  // Create all the database tables if there are none
  // by redirecting to the Migrations controller
    if (count($this->db->list_tables()) == 0) {
       redirect('migrate');
     }
     // More code
}

```

In the Migrate controller:

```
class Migrate extends CI_Controller
{
  public function __construct()
  {
    parent::__construct();
  }

  public function index()
  {
    $this->load->library('migration');

    if($this->migration->current() === FALSE)
    {
      show_error($this->migration->error_string());
    }
    else {
      $this->session->set_flashdata('tables_created', "All the required database tables have been created. You can now register.");
      redirect('/');
    }
  }
}

```