function AkInstaller($db_connection = null) { if(empty($db_connection)){ $this->db =& AkDbAdapter::getInstance(); }else { $this->db =& $db_connection; } AkDbSchemaCache::clearAll(); $this->data_dictionary =& $this->db->getDictionary(); $this->available_tables = $this->getAvailableTables(); }
function resetFrameworkDatabaseTables() { require_once(AK_APP_DIR.DS.'installers'.DS.'framework_installer.php'); $installer = new FrameworkInstaller(); $installer->uninstall(); $installer->install(); AkDbSchemaCache::clearAll(); }
private function _createMigrationsTableIfNeeded() { if (!$this->tableExists('akelos_migrations')) { AkDbSchemaCache::clearAll(); $this->data_dictionary = $this->db->getDictionary(); $this->available_tables = $this->getAvailableTables(); $this->createTable('akelos_migrations', 'id, name, version int'); $this->addIndex('akelos_migrations', 'UNIQUE name', 'unq_name'); } }