First time here? Check out the FAQ!
1

big sqlite database
 

i have only 300 Question and 60 registred users. how can that my Sqlite databse is so huge (500MB) is there any way to cleanup the database . or to move it to Mysql ?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
zulp's avatar
21
zulp
asked 11 years ago

Comments

see more comments

2 Answers

1

Move to PostgresQL - the best option for the production hosting of all available.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago
link

Comments

Trying to convert my sqlite database postgresql

[root@Centos DEV]# python manage.py shell --database=sqlite
/usr/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
Usage: manage.py shell [options]

Runs a Python interactive interpreter. Tries to use IPython, if it's available.

manage.py: error: no such option: --database

How to solve that ?

zulp's avatar zulp (11 years ago)

Use django's dumpdata and loaddata commands.

Evgeny's avatar Evgeny (11 years ago)
see more comments
1

one way to do it (not 100% reliable) is to do the following:

With sqlite as a database:

python manage.py dumpdata > mydata.json

Change to postgres in settings.py, run sycdb and migrate commands and then:

python manage.py loaddata < mydata.json

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Fitoria's avatar
1.1k
Fitoria
answered 11 years ago
link

Comments

see more comments