remove fav/reblog counters. they were never used

This commit is contained in:
codl 2021-05-14 19:46:59 +02:00
parent 5866592f50
commit 8c750d3207
3 changed files with 27 additions and 4 deletions

View File

@ -145,8 +145,6 @@ def post_from_api_object(obj, instance):
created_at=obj['created_at'],
author_id=account_from_api_object(obj['account'], instance).id,
direct=obj['visibility'] == 'direct',
favourites=obj['favourites_count'],
reblogs=obj['reblogs_count'],
is_reblog=obj['reblog'] is not None,
)

View File

@ -0,0 +1,26 @@
"""remove favourite, reblog count from posts
Revision ID: af763dccc0b4
Revises: 4b56cde3ebd7
Create Date: 2021-05-14 19:45:37.429645
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'af763dccc0b4'
down_revision = '4b56cde3ebd7'
branch_labels = None
depends_on = None
def upgrade():
op.drop_column('posts', 'reblogs')
op.drop_column('posts', 'favourites')
def downgrade():
op.add_column('posts', sa.Column('favourites', sa.Integer(), nullable=True))
op.add_column('posts', sa.Column('reblogs', sa.Integer(), nullable=True))

View File

@ -13,12 +13,11 @@
<li>The post's time and date of publishing</li>
<li>Whether the post has any media attached</li>
<li>Whether the post has been favourited by you</li>
<li>How many favourites and reblogs / retweets the post has</li>
<li>(Mastodon only) Whether the post is a direct message</li>
</ul>
<p>No other post metadata and no post contents are stored by Forget.</p>
<p>Last updated on 2017-12-27. <a href="https://github.com/codl/forget/commits/master/templates/privacy.html">History</a>.</p>
<p>Last updated on 2021-05-14. <a href="https://github.com/codl/forget/commits/master/templates/privacy.html">History</a>.</p>
</section>
{% endblock %}