I have a column called "`p_type`" which is string, since I thought to have types `A`, `B` and `C` as strings

now I realize that it is better to have that as a `bitmask` so I can have `A` and `C` together. 

If I do

```
change_column :cars, :p_type, :integer

```

I will either lose all my existing p\_type data or something will go horribly wrong and migration will distort the data somehow ( I am afraid to try)

Is there a way to change the column type to :`integer` and have some kind of function in the migration file that will do

```
if A
 p_type = 1
elsif B
 p_type = 2
elsif C
 p_type = 4
end

```

so the migration would change the data type and the data itself?