Re: Writing migrations to wrong database entirely

2023-11-14 Thread Lutaaya Jamil
I guessed that would be the issue as I normally run into it at times On Tuesday, 14 November 2023 at 18:56:02 UTC+3 David Crandell wrote: > Found the issue. I had a DATABASE_URL defined in my environment variables > for one of my projects and my other project was somehow using this even > thoug

Re: Writing migrations to wrong database entirely

2023-11-14 Thread David Crandell
Found the issue. I had a DATABASE_URL defined in my environment variables for one of my projects and my other project was somehow using this even though settings.py had its own definition under DATABASES. I temporarily changed the DATABASE_URL var to a different name to eliminate it from the

Re: Writing migrations to wrong database entirely

2023-11-14 Thread Ahmed Iftikhar
It's possible that there is a migration state issue. Try running the following commands: *python manage.py migrate zeropython manage.py migrate * This will revert all migrations for the specified app and then migrate all apps to the initial state. Be cautious, as this will reset your databas

Re: Writing migrations to wrong database entirely

2023-11-14 Thread Lutaaya Jamil
Are you using the database_url your environment variables? Maybe the file is same On Tuesday, 14 November 2023 at 17:14:22 UTC+3 David Crandell wrote: > > > Howdy, I have been working with Django for about three years now and have > developed