function drush_sql_empty_db

6.x sql.drush.inc drush_sql_empty_db($db_spec)
4.x sql.drush.inc drush_sql_empty_db($db_spec = NULL)
5.x sql.drush.inc drush_sql_empty_db($db_spec = NULL)

Drop all tables (if DB exists) or CREATE target database.

return boolean TRUE or FALSE depending on success.

2 calls to drush_sql_empty_db()
drush_archive_restore in commands/core/archive.drush.inc
Command callback. Restore web site(s) from a site archive file.
drush_core_pre_site_install in commands/core/site_install.drush.inc
Perform setup tasks for installation.

File

commands/sql/sql.drush.inc, line 1427
Drush sql commands

Code

function drush_sql_empty_db($db_spec) {
  if (drush_sql_db_exists($db_spec)) {
    _drush_sql_drop($db_spec);
  }
  else {
    _drush_sql_create($db_spec);
  }
}