Files
danbooru/db/views
evazion 0830af49a7 db: add user_actions view.
Add a user_actions view. This view unions together a bunch of tables to
produce an event log of every action taken by a user.

Also add a bunch of indexes to make queries on this table efficient.
Even though the view is an enormous query combining together about 30
different tables, queries are very efficient as long as every table has
`created_at` and `(user_id, created)` indexes.
2022-09-16 04:20:19 -05:00
..