lemmy/migrations/2024-11-21-195004_add_report_count/down.sql
Dessalines ba3d574d92
Add report_counts to post and comment aggregate tables. (#5219)
* Add report_counts to post and comment aggregate tables.

- This adds a report_count and unresolved_report_count to
  the post and comment aggregate tables.
- Useful for front-ends wishing to show report links.
- Fixes #4163

* Updating the historical counts.

* Switching from bigint to smallint.

* Using dullbananas create_trigger function.
2024-11-25 11:24:57 +01:00

9 lines
203 B
SQL

ALTER TABLE post_aggregates
DROP COLUMN report_count,
DROP COLUMN unresolved_report_count;
ALTER TABLE comment_aggregates
DROP COLUMN report_count,
DROP COLUMN unresolved_report_count;