diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-09 20:25:39 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-09 20:25:39 +0100 |
commit | 6331ed16e5953e3a006896c6df07b0f82cfd2350 (patch) | |
tree | b1b03e90ccb2feddc65aaf689808658381118228 /db/migrate | |
parent | c424df5192f346dba5332a4b3a2de43b2f028e0c (diff) |
Fix #614 - extra reply-boolean on statuses to account for cases when replied-to
status is not in the system at time of distribution; fix #607 - reset privacy settings to defaults when cancelling replies
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20170209184350_add_reply_to_statuses.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20170209184350_add_reply_to_statuses.rb b/db/migrate/20170209184350_add_reply_to_statuses.rb new file mode 100644 index 000000000..c5074728b --- /dev/null +++ b/db/migrate/20170209184350_add_reply_to_statuses.rb @@ -0,0 +1,10 @@ +class AddReplyToStatuses < ActiveRecord::Migration[5.0] + def up + add_column :statuses, :reply, :boolean, nil: false, default: false + Status.update_all('reply = (in_reply_to_id IS NOT NULL)') + end + + def down + remove_column :statuses, :reply + end +end |