Run `python manage.py dbshell` to open the interactive command-line tool for the database configured by a Django project. It provides one familiar entry point even when projects use different database systems; once inside, commands follow that database’s own tool. section 4.3
(venv) RiffMates$ python manage.py dbshell
Start the shell from the project directory with Django’s management command. section 4.3
With the default SQLite database, the prompt lets you inspect tables and run SQL directly:
- SQLite displays an `sqlite>` prompt after starting. section 4.3
- Use `.tables` to list tables, including Django’s built-in tables, migration-tracking tables, and the application’s model tables. section 4.3
- Use `.schema bands_musician` to inspect the SQL used to create the table mapped from the `Musician` model. section 4.3
- Distinguish SQLite dot commands from SQL statements: dot commands belong to the shell, while SQL queries operate directly on database data. section 4.3
