I have very strange situation here.
Problem: I describe original problem inside this post, but to sum up:
After using the project for a while, makemigrations stop working for me. (Yes I have set everything ok, setting are ok,.. please see my comments on previous post)
I decided that I can't figure this out, so I would start fresh. (thats why git is for :D )
So, I delete my django project, I create new virtual environment, and I also create new database and new user in postgres.
I update new database parameter inside my config file and try to run initial makemigrations but with no luch. It is still say that no new migrations are available.
I am desperate because I can't work on the project, so any solution would do :D
(virtual_environment) MacBook-Pro-2:MY_PROJECT marko$ python manage.py makemigrations connectors environment=local
I will use local settings.
No changes detected in app 'connectors'
All my migrations
(virtual_environment) MacBook-Pro-2:MY_PROJECT marko$ python manage.py showmigrations environment=local
I will use local settings.
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
connectors
(no migrations)
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
sessions
[X] 0001_initial
When lunch migration
(virtual_environment) MacBook-Pro-2:MY_PROJECT marko$ python manage.py migrate --fake-initial environment=local
I will use local settings.
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
No migrations to apply.
The funny thing is that if I close postgres database, I still get the same text in terminal. I would guess that I should get some connection error.
database config yaml
database:
port: 5432
host: 'localhost'
user: 'user1'
password: 'user_password_123!'
db: 'db1'
and my settings file:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': CONFIG['database']['db'],
'USER': CONFIG['database']['user'],
'PASSWORD': CONFIG['database']['password'],
'HOST': CONFIG['database']['host'],
'PORT': CONFIG['database']['port'],
}
}