demarches-normaliennes/db/migrate/20190607122941_ensure_follow_dates_not_null.rb
Nicolas Bouilleaud ba48a1da6e Ensure Follow dates can not be not null
* Add Follow.unfollowed_at
* Change the unicity constraint to gestionnaire/dossier AND unfollowed_at
2019-06-12 17:33:53 +02:00

8 lines
325 B
Ruby

class EnsureFollowDatesNotNull < ActiveRecord::Migration[5.2]
def change
change_column_null :follows, :demande_seen_at, false
change_column_null :follows, :annotations_privees_seen_at, false
change_column_null :follows, :avis_seen_at, false
change_column_null :follows, :messagerie_seen_at, false
end
end