[Answered ]-Cannot alter tables after Django migration in posgres DB

1👍

It seems like you want to drop the link to test_API in test_API_2. If you want to be able store ‘abcd’ type strings, and not try to keep anything from the relation previously created by the ForeignKey field, then I believe you need to do this in a two step process.

First step would be to remove (or comment) the IDNnumber field, make migrations, then add it back with a new type of field.

The IDNumber field was more than an integer field, it has an indexed relation to test_API, so you need to sever that first by removing the field, then create a new field with identical name.

👤AMG

Leave a comment