I'm working on Django 1.11, Python 2.7 and Postgres 10.7.
We have different environments dev and prod. And in one lower environment dev, the id column for a Model is not primary key. In the upper environment prod, it is made PrimaryKey.
I'm not sure how they created a table without a PrimaryKey column earlier in DJango.
I created a migration file with respect to lover environment dev which will be moved and deployed in prod environment later. And the migration file contains required operations to alter the id column to PrimaryKey in the Model in dev database.
I'm confused whether it's going to create an issue in future when applying migrations in prod as the constraint of having id column as PrimaryKey already exists in prod environment or is it just going to ignore the operation as it's already in place.
Should I just apply the migration in lower environment and remove the operation from migration file so that it won't be applied in prod.
Can someone please clarify the query.