Y
Y
Yuri2021-07-08 10:04:39
PostgreSQL
Yuri, 2021-07-08 10:04:39

How to properly deploy a project on a new machine?

There is a project on Django 3.0, at first it worked on SQLite but was transferred to PostgreSQL

Now the task is to deploy it on a new machine.

All project files are in git.
My steps are:
1) git pull
2) dumped the PostgreSQL database
3) deployed the database locally
4) run ./manage.py runserver:

You have 305 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, branch, contenttypes, easy_thumbnails, finance, main, plates, products, sessions, sms.
Run 'python manage.py migrate' to apply them.

5) I think since the database has already been migrated, I will do migrations --fake, but here is an error:
raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (no schema has been selected to create in
LINE 1: CREATE TABLE "django_migrations" ("id" serial NOT NULL PRIMA...


Where to dig?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question