Skip to content

Instantly share code, notes, and snippets.

@taylor01
Created August 31, 2017 15:44
Show Gist options
  • Save taylor01/acd45287f15af7ff71e9c05edbb5803d to your computer and use it in GitHub Desktop.
Save taylor01/acd45287f15af7ff71e9c05edbb5803d to your computer and use it in GitHub Desktop.
Postgres Array attribute migration
class AddLocationToVisitObservation < ActiveRecord::Migration[5.1]
def change
add_column :visit_observations, :location, :text, array:true, default: []
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment