7

I am trying to update the column on a variable to allow null in a db shell so that I don't have to drop my table.

I have notice data.sqlite lives on the main folder and sqlite3.db lives on the "main app" subfolder. Why is that? Which one is the one I want to access?

I know they are 2 different files and in 2 different directories and that this is the standard configuration when a Django project is generated. I guess my question is what is the difference between this two files and if there is a reason they are not in the same folder. Thank!

1 Answer 1

19

As with all database backends:

./manage.py dbshell
Sign up to request clarification or add additional context in comments.

4 Comments

Thanks. What about the reason data.sqlite is in one place and sqlite3.db is in another place? Is one the schema?
No, sqlite doesn't use a separate schema. The db goes in the path/file you specify in settings.DATABASES - perhaps you changed it at some point?
I am pretty sure they are 2 different files and in 2 different directories and this is the standard configuration when a Django project is generated. I guess my question is what is the difference between this two files and if there is a reason they are not in the same folder. Thank!
Worth pointing out - for dbshell to work, the client binary for the database needs to be available in your system (and in your PATH). For sqlite, the client is called sqlite3. Just having Python installed is not sufficient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.