Question: I'm practicing methods, but the problem is I want to separate inputting and sorting, the display method will be the main, I'm having trouble fixing this calling from other class.

This is my script :

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CaseProblem
{
    class Method
    {
        static void MethodInput()
        {
            int[] array = new int[5];
            int i;
            // loop for accepting values in array
            for (i = 0; i < 5; i++)
            {
                Console.Write("Enter number:\t");
                array[i] = int.Parse(Console.ReadLine());
            }
        }
        public static void MethodSort()
        {
            foreach (int i in array)
            {
                Console.Write(" {0}", i);
            }
        }
    }
    class Program
    {
        static void Main(int[]array)
        {
            //sorting array value;
            Array.Sort(array); //use array's sort function

            Method.MethodSort(array);
            Console.ReadLine();
        }
    }
}

```

Thank you for your help

Answer: 
First, create a backup of your database. Copy it to your development machine. Try things out on that. That way it doesn't matter if it does go "boom" for some reason.

The first thing to do is

```
python manage.py showmigrations

```

This shows all the existing migrations, and it *should* show that they have been applied with an `[X]`.

Then,

```
python manage.py makemigrations

```

Makes a new migration file for your new model (name 00004\_...).

Then do

```
python manage.py migrate

```

to apply it. To undo it, go back to the state of migrations 00003, with

```
python manage.py migrate <yourappname> 00003

```
I solved it simply, changing the name of the new model to the original name, and then I checked if there is the table in the database, if not, I just create a new table with the old name with just a field like id.
And then clear migrations and create new migrations, migrate and verify table was fixed in DB and has all missing fields.
If it still doesn't work, then change the model name back to a new one.
but when django asks you if you are renaming the model you should say NO to get the old one removed properly and create a new one.

This type of error usually occurs when you delete some table in dB manually, and then the migration history changes in the tables are lost.
But it is not necessary to erase the entire database and start from scratch.