[openstreetmap-website] Changeset discussion feature (#772)
Tom Hughes
notifications at github.com
Fri Jul 25 15:11:33 UTC 2014
> @@ -0,0 +1,11 @@
> +require 'migrate'
> +class AddJoinTableBetweenUsersAndChangesets < ActiveRecord::Migration
> + def change
> + create_table :changesets_subscribers, id: false do |t|
> + t.column :subscriber_id, :bigint, null: false
> + t.column :changeset_id, :bigint, null: false
> + end
We need to add indexes here on both `subscriber_id` and `changeset_id` or things will quickly collapse as we build up subscribers ;-) What I would suggest is a unique index on `[:subscriber_id, :changeset_id]` which will also make duplicate entries impossible, and an ordinary index on `[:changeset_id]` for finding the subscribers to a changeset.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/772/files#r15405547
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20140725/0b8f50bd/attachment.html>
More information about the rails-dev
mailing list