Sha256: 2f6b4f10ac2829ed7431f5223fb67ee8cfae609f608262423ce3970fa441553f
Contents?: true
Size: 578 Bytes
Versions: 1
Compression:
Stored size: 578 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
houston-core-0.5.0.beta1 | db/migrate/20140517012626_prevent_hstore_fields_from_being_null.rb |