B
B
Boldy2015-02-07 10:08:56
MySQL
Boldy, 2015-02-07 10:08:56

Why can't I dump the database in django?

Moving from SQLite to MySQL.

# ./manage.py dumpdata > dump.json --natural
CommandError: Unable to serialize database: no such table: easy_select2_related
# sqlite3 ../../ppdb.sqlite3
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table easy_select2_related(id);
sqlite> 
# ./manage.py dumpdata > dump.json --natural
CommandError: Unable to serialize database: no such table: easy_select2_related

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Eremin, 2015-02-08
@Sergei_Erjemin

What is easier? You enter the SQlite console and do: you
look at which tables are created in the model (there are all sorts:

class Meta:
        db_table="что-то"

and not the fact that the table naming scheme is default). And when you already know the names of the tables, do it:
www.sqlite.org/cli.html to help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question