So how would you do it safely? You break it in multiple steps:

- add a new integer column
- use a script to backfill the data to the new column, converting it
- switch the application to use the new column
- drop the original text column

This is an example of the expand/contract pattern.

Comments