There is no good way.
The best that I’ve found is to:
- add a new column using the element with all the various constraints and whatnot that you want
- Do UPDATE yourTable SET newColumn = oldColumn
- Drop the old column with a element
- Rename newColumn to oldColumn using the refactoring
I’m all ears if someone has a better (portable) idea.
Best,
Laird