3 ms·
How would you handle a situation where the underlying data needs to be transformed? For example, converting a text column to an int column?
by fbonetti 8y ago
How would you handle a situation where the underlying data needs to be transformed? For example, converting a text column to an int column?
- djrobstep 8y agoIn that particular example, migra will detect that change and generate the right `alter column` statement with a `using` clause. It's impossible to handle every case, of course, such as when renames happen or data needs to be moved/inserted. Migration scripts always need reviewing. Tools can get you most of the way there automatically, and help you test, but not all of the way.