-1

So I am stuck in this problem: https://stackoverflow.com/questions/53637182/django-no-such-table-main-auth-user-old

I can't upgrade Django because many other applications are connected to it using version 2.1. The only approach is to edit the sqlite3. Currently, I am using SQLITE3 3.26.0 and I want to downgrade to 2.5.1. How can I do this?

1
  • Why don't you create a virtual environment for your new application with a newer version of Django? Is it an option?
    – FloT
    Oct 21, 2019 at 20:23

1 Answer 1

0

I can't upgrade Django because many other applications are connected to it using version 2.1. [...] Currently, I am using SQLite 3.26.0 and I want to downgrade to 2.5.1. How can I do this?

You don't.

  1. Back up a dump. Try to have it in text mode.
  2. Build SQLite 2 from sources.
  3. Restore the dump from SQLite 2. Fail to.
    1. Edit awk scripts to fix your issues or use a data base migration software.
    2. Try again to restore, if it fails, go back to 3.1.
  4. Done.
3
  • Thanks @John. However, I am new here. Could you please elaborate just a bit more on each step. Highly appreciated.
    – Nano
    Oct 4, 2019 at 17:25
  • We're all new to something. I feel your pain.
    – 48347
    Oct 4, 2019 at 17:30
  • I think what @john means is that you have to take a text dump of your database. There will be incompatibilities. Therefore you use *nix text processing tools like sed or awk to make changes to your dump to make it compatible with SQLite 2.1. You can see an example here or here.
    – Vérace
    Oct 4, 2019 at 19:50

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.