So you suggest that instead of dropping the DB manually, I let them be. And
ideally there would be create and alter commands in the backup file. I
guess we can go ahead with that. It's more suited to a generalized scenario.

Maybe later parameters can be introduced like the backup() command.
On Jan 3, 2013 5:26 PM, "Andrey Andreev" <notifications@github.com> wrote:

> In system/database/DB_utility.php:
>
> > +		{
> > +			$CI =& get_instance();
> > +			$CI->load->helper('file');
> > +
> > +			$string = read_file($prefs['filepath']);
> > +			$queries = explode(';', $string);
> > +
> > +			if ($string)
> > +			{
> > +				// Load database and dbforge library
> > +				$CI->load->database();
> > +				$CI->load->dbforge();
> > +				
> > +				$db_name = $CI->db->database; // get name of active database
> > +
> > +				$CI->dbforge->drop_database($db_name); // drops the active database
>
> Truncate is better, especially if some custom parameters have been used
> while creating the database. Although, I could again argue that a "restore"
> procedure should just execute what's in the backup.sql - any create clauses
> should be in there, ideally.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/EllisLab/CodeIgniter/pull/2105/files#r2537617>.
>
>