Forums

Postgres and SQLite (Django)

Hello, a group of questions... if i have any premium plan with Postgres active: 1) is posible that can i change whenever i want the database between Postgres and SQLite? Or i have to use only Postgres? 2) Another thing is... that if i have 2 differents app, can i use in one SQLite and in another one Postgres? 3) Can i migrate the data from SQLite to Postgres and vice versa?

1) Sure! You can use any database that your account supports. We'd recommend avoiding SQLite on PythonAnywhere, especially for code that handles non-trivial amounts of data (it doesn't perform well on our networked filesystem) but if, for example, you want to start off with SQLite when you're not dealing with a lot of data, and then migrate across later, you should be fine.

2) Absolutely, though again we'd recommend using Postgres (or MySQL).

3) Yes, you can, though you'd need to do that yourself using the tools provided. If you're using a web framework then it might provide easy ways to do that -- for example, Django's dumpdata and loaddata commands.