database:drop
Resets the entire instance by deleting all data from every connected backend: all nodes and relations in the graph database, the MongoDB database, all objects in S3 object storage, all Elasticsearch indices, all Redis keys, and all RabbitMQ queues.
Options:
-f,--force- skips the interactive “Are you sure?” confirmation prompt. Without it, the command asks for confirmation and aborts (returning a non-zero exit code) if not confirmed.
Destructive
This command is irreversible and deletes everything the instance currently stores - there is no per-collection or per-graph option. Only use it in throwaway or test environments, or right before restoring a backup with backup:load.
Help
php bin/console database:drop --helpDescription: Resets all connected databases. Usage: database:drop [options] Options: -f, --force|--no-force If enabled, command will not ask for manual confirmation. -h, --help Display help for the given command. When no command is given display help for the list command --silent Do not output any message -q, --quiet Only errors are displayed. All other output is suppressed -V, --version Display this application version --ansi|--no-ansi Force (or disable --no-ansi) ANSI output -n, --no-interaction Do not ask any interactive question -e, --env=ENV The Environment name. [default: "prod"] --no-debug Switch off debug mode. --profile Enables profiling (requires debug). -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Example
php bin/console database:drop -f▄ ▄▀ ▀▄ Ember Nexus API ▀█▀ v0.1.31, production mode Database Drop ┌ Task 1 of 6: Cypher ────────────────────────────────────────────────────────── │ Deleting Cypher data... └ Successfully deleted cypher data. ┌ Task 2 of 6: MongoDB ───────────────────────────────────────────────────────── │ Deleting Mongo data... └ Successfully deleted Mongo data. ┌ Task 3 of 6: Object Storage ────────────────────────────────────────────────── │ Deleting Object data... └ Successfully deleted object storage. ┌ Task 4 of 6: Elastic Search ────────────────────────────────────────────────── │ Deleting Elastic data... └ Successfully deleted Elastic data. ┌ Task 5 of 6: Redis ─────────────────────────────────────────────────────────── │ Deleting Redis data... └ Successfully deleted Redis data. ┌ Task 6 of 6: RabbitMQ ──────────────────────────────────────────────────────── │ Deleting RabbitMQ data... └ Successfully deleted RabbitMQ data. ▶ Database successfully dropped.