title: Alter string to enum
body: <p>I am using the method below to change the column type from string to enum. Is there an alternative way to do this?</p>
  
  <p>Is it possible to use it as a knex.raw to form such query?</p>
  
  <pre><code>CREATE TYPE type AS ENUM ('disabled', 'include', 'exclude');
  ALTER TABLE test_table ALTER COLUMN test_col DROP DEFAULT;
  ALTER TABLE test_table ALTER COLUMN test_col TYPE logic USING(test_col::type), ALTER COLUMN test_col SET DEFAULT 'disabled'::logic;
  
  
         return schema
          .table('offers', function (table) {
              cols.forEach(function (column) {
                  table.renameColumn(column, column + '_old');
              });
  
          }).then(function () {
  
              var schema = knex.schema;
  
              return schema.table('offers', function (table) {
                  cols.forEach(function (column) {
                      table.enum(column, ['disabled', 'include', 'exclude']).defaultTo('disabled');
                  });
              });
  
          }).then(function () {
              return knex.select('*').from('offers');
          }).then(function (rows) {
  
              return Promise.map(rows, function (row) {
                  var data = {};
                  cols.forEach(function (column) {
                      data[column] = row[column+'_old'];
                  }, data);
                  return knex('offers').where('id', '=', row.id).update(data);
              })
  
          }).then(function () {
              var schema = knex.schema;
              return schema.table('offers',function (table) {
                  cols.forEach(function (column) {
                      table.dropColumn(column+'_old');
                  });
              });
  
          });
  </code></pre>