3 class AddJoinTableBetweenUsersAndChangesets < ActiveRecord::Migration[4.2]
5 create_table :changesets_subscribers, :id => false do |t|
6 t.column :subscriber_id, :bigint, :null => false
7 t.column :changeset_id, :bigint, :null => false
10 add_foreign_key :changesets_subscribers, :users, :column => :subscriber_id, :name => "changesets_subscribers_subscriber_id_fkey"
11 add_foreign_key :changesets_subscribers, :changesets, :name => "changesets_subscribers_changeset_id_fkey"
13 add_index :changesets_subscribers, [:subscriber_id, :changeset_id], :unique => true
14 add_index :changesets_subscribers, [:changeset_id]