getVersion(), __FILE__, __LINE__, __METHOD__, 9 ); $tables = $this->getDatabaseConnection()->MetaTables(); if ( in_array( 'log', $tables ) ) { //Make sure this only runs for PGSQL databases. if ( strncmp( $this->getDatabaseConnection()->databaseType, 'postgres', 8 ) == 0 ) { //Upgrading, rename log file. $query = 'alter table "log" rename to "system_log"'; $this->getDatabaseConnection()->Execute( $query ); $query = 'alter index "log_id" rename to "system_log_id"'; $this->getDatabaseConnection()->Execute( $query ); $query = 'alter index "log_user_id_table_name_action_id" rename to "system_log_user_id_table_name_action_id";'; $this->getDatabaseConnection()->Execute( $query ); $query = 'alter table "log_id_seq" rename to "system_log_id_seq";'; $this->getDatabaseConnection()->Execute( $query ); } else { Debug::text( 'preInstall: Not a PGSQL database, skipping special commands', __FILE__, __LINE__, __METHOD__, 9 ); } } return true; } /** * @return bool */ function postInstall() { Debug::text( 'postInstall: ' . $this->getVersion(), __FILE__, __LINE__, __METHOD__, 9 ); return true; } } ?>