@@ -125,18 +126,37 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
*/
publicfunctiondropDatabase()
{
try{
if(!$dsn=$this->getOption('dsn')){
thrownewDoctrine_Connection_Exception('You must create your Doctrine_Connection by using a valid Doctrine style dsn in order to use the create/drop database functionality');
}
$info=$this->getManager()->parseDsn($dsn);
try{
if(!$dsn=$this->getOption('dsn')){
thrownewDoctrine_Connection_Exception('You must create your Doctrine_Connection by using a valid Doctrine style dsn in order to use the create/drop database functionality');
}
$this->export->dropDatabase($info['database']);
$info=$this->getManager()->parseDsn($dsn);
return'Successfully dropped database for connection "'.$this->getName().'" at path "'.$info['database'].'"';
}catch(Exception$e){
return$e;
}
$this->export->dropDatabase($info['database']);
return'Successfully dropped database for connection "'.$this->getName().'" at path "'.$info['database'].'"';