/** * Initialize this table in the given database the first * time the method is called and never again. * * @return null */ public function initializeOnce(Database $database) { $this->memoize(__METHOD__, function () use($database) { $query = $this->queryForCreateTable(); // Make sure the table has been created $database->exec($query); // Execute each creation query to add additional // table constraints, etc. foreach ($this->create_query_list as $query) { $database->exec($query); } return 1; }); }