Sha256: c0e0a0c9d557fe4439ab34f7c6222101dfab2a48f64f4cf58d8e16daa1f9b7ed
Contents?: true
Size: 574 Bytes
Versions: 17
Compression:
Stored size: 574 Bytes
Contents
class PreventHstoreFieldsFromBeingNull < ActiveRecord::Migration FIELDS = [ [:milestones, :extended_attributes], [:projects, :extended_attributes], [:projects, :view_options], [:projects, :feature_states], [:tickets, :extended_attributes], [: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
17 entries across 17 versions & 1 rubygems