maazza
maazza

Reputation: 7183

how can I view the schema of my sqlite database in pycharm?

I have sqlite database in a django project and everything works fine.

But seeing django dbshell does not work with sqlite I found pycharm has a database connector/manager but I can't find where I can input sql commands or see the schema.

Thanks

Upvotes: 7

Views: 21398

Answers (2)

CourteousCoder
CourteousCoder

Reputation: 21

TL;DR: For anyone coming across this problem, I fixed it with JetBrains toolbox. Just upgrade PyCharm, using default configurations.

Detailed Instructions

  1. Download JetBrains Toolbox, if you don't have it already.
  2. If you installed PyCharm via JetBrains Toolbox, then skip this step. Otherwise, uninstall PyCharm and then reboot.
  3. Launch Jetrbrains Toolbox, and enter your license information.
  4. Install / Update PyCharm using the Toolbox.
  5. Launch PyCharm using JetBrains Toolbox.
  6. If you are prompted to import configuration files from an older version of PyCharm, do not import. If you need those configurations, then I recommend manually setting them afterward.
  7. Open your existing project.
  8. Open the Database tool window (View -> Tool Windows -> Database)
  9. PyCharm should autodetect the Django Sqlite3 database.
  10. Click the notification, and it should add a data-source called Django default.

Upvotes: 2

maazza
maazza

Reputation: 7183

Ok found it it is on the far right side of the window there is a "database" tab

In pycharm 5 pro at least

Upvotes: 6

Related Questions