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)
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 1214
Drush sql commands

Code

function drush_sql_empty_db($db_spec = NULL) {
  if (is_null($db_spec)) {
    $db_spec = _drush_sql_get_db_spec();
  }
  if (drush_sql_db_exists($db_spec)) {
    _drush_sql_drop($db_spec);
  }
  else {
    _drush_sql_create($db_spec);
  }
}