Remove existing database tables using the Akron CLI across SQLite, MySQL, PostgreSQL, and MongoDB.
The drop-table
command removes existing tables from your database. This is a destructive operation that permanently deletes the table and all its data. Use with caution.
akron drop-table <table_name> --db <database_url>
This command permanently deletes the table and all its data. Make sure to backup your data before running this command.
Type: str (required)
Name of the table to drop. Must exist in the target database.
Type: str (required)
Database connection URL. Supports sqlite://, mysql://, postgres://, and mongodb:// schemes.
Type: flag (optional)
Skip confirmation prompt and force table deletion.
Are you sure you want to drop table 'users'? (y/N): y ✓ Table 'users' dropped successfully from SQLite database
✓ Table 'products' dropped successfully from MySQL database ✓ All data has been permanently deleted
✓ Table 'orders' dropped successfully from PostgreSQL database ✓ All associated indexes and constraints removed
✓ Collection 'users' dropped successfully from MongoDB database ✓ All documents and indexes removed
By default, the command asks for confirmation before dropping tables:
Always backup your data before dropping tables: