I am attempting to db:migrate:reset and encountered this error:
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::SyntaxError: ERROR: syntax error at or near "USING"
LINE 1: SELECT 'integer[] USING ARRAY[pdf_page_number]::INTEGER...
^
CONTEXT: invalid type name "integer[] USING ARRAY[pdf_page_number]::INTEGER[][]"
The migration file causing this error:
class ChangeCartItemsPageNumbersToArray < ActiveRecord::Migration[5.2]
def up
change_column :cart_items, :pdf_page_number, 'integer[] USING ARRAY[pdf_page_number]::INTEGER[]', array: true, null: false, default: []
end
end
Thanks!