Sha256: 62247469dfac7e9fa5d3229db05eae03baed75ce9b8768d11254495d9ac27608
Contents?: true
Size: 492 Bytes
Versions: 10
Compression:
Stored size: 492 Bytes
Contents
class PreventHstoreFieldsFromBeingNull < ActiveRecord::Migration FIELDS = [ [:projects, :extended_attributes], [:projects, :view_options], [:projects, :feature_states], [:users, :view_options] ] def up FIELDS.each do |(table, column)| change_column table, column, :hstore, null: false, default: '' end end def down FIELDS.each do |(table, column)| change_column table, column, :hstore, null: true, default: nil end end end
Version data entries
10 entries across 10 versions & 1 rubygems