I am trying to move to heroku which uses PostgreSQL 8.4 which has a citext column type which is nice since the app was written for MySQL.
Is there any way to use :ci
For anyone wanting to change an existing string
column to citext
, try creating a migration
rails g migration change_username_from_string_to_citext
Then make the migration look like this
class ChangeUsernameFromStringToCitext < ActiveRecord::Migration[6.0]
def change
enable_extension("citext") # Don't forget this line
change_column :users, :username, :citext
end
end