cannot cast type smallint to boolean django 1

cannot cast type smallint to boolean django

# if the existing data is not that important for you, you can delete the column and create a new one

# 1. first step remove currency from you model and apply migration
# 2. add again the currency with the new definition and apply again the migration

Here is what the above code is Doing:
1. First, we create a new migration file.
2. Then, we add a new column to the table.
3. Next, we populate the new column with the data from the old column.
4. Finally, we remove the old column.

Similar Posts