3 | | 1. You CANNOT switch pk field type if you already have some data in it without custom operations. |
4 | | 2. the naive solution could be to remake all the tables that are referencing to a model's pk but even that is not possible in MySql as we cannot drop a table if it is referenced by other table.(throws error in case when 2 models are related to each other) |
5 | | 3. the only solution i can think of (and tried) is deleting all related models and then recreating them with new uid field. |
| 3 | 1. the naive solution could be to remake all the tables that are referencing to a model's pk but even that is not possible in MySql as we cannot drop a table if it is referenced by other table.(throws error in case when 2 models are related to each other) |
| 4 | 2. the only solution i can think of (and tried) is deleting all related models and then recreating them with new uid field. |
| 5 | 3. One more way to do this can be to turn off FOREIGN_KEYS_CHECKS and then remake table, but that can be risky and can lead to data inconsistencies. |