Ensure filters have a filter_id
Closes #313 (closed).
Since there's no good way for PostgreSQL to assign a default, but unique-per-user filter_id
, and Ecto doesn't support primary keys that span multiple columns, this needs some other way to ensure a unique-per-user filter_id
. The simplest way I could find is to look up the max filter_id
for a user and add 1.