@@ -125,18 +126,37 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
...
@@ -125,18 +126,37 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
*/
*/
publicfunctiondropDatabase()
publicfunctiondropDatabase()
{
{
try{
try{
if(!$dsn=$this->getOption('dsn')){
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');
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);
$this->export->dropDatabase($info['database']);
$info=$this->getManager()->parseDsn($dsn);
return'Successfully dropped database for connection "'.$this->getName().'" at path "'.$info['database'].'"';
$this->export->dropDatabase($info['database']);
}catch(Exception$e){
return$e;
return'Successfully dropped database for connection "'.$this->getName().'" at path "'.$info['database'].'"';