|
8 | 8 | # for a pact are deleted together when you delete the pact resource for that
|
9 | 9 | # consumer version, and when that happens, this row will cascade delete.
|
10 | 10 | create_table(:latest_pact_publication_ids_by_consumer_versions, charset: 'utf8') do
|
11 |
| - foreign_key :consumer_id, :pacticipants, nil: false, on_delete: :cascade # redundant, but speeds up queries by removing need for extra join |
12 |
| - foreign_key :consumer_version_id, :versions, nil: false, on_delete: :cascade |
13 |
| - foreign_key :provider_id, :pacticipants, nil: false, on_delete: :cascade |
14 |
| - foreign_key :pact_publication_id, :pact_publications, nil: false, on_delete: :cascade, unique: true |
| 11 | + foreign_key :consumer_id, :pacticipants, null: false, on_delete: :cascade # redundant, but speeds up queries by removing need for extra join |
| 12 | + foreign_key :consumer_version_id, :versions, null: false, on_delete: :cascade |
| 13 | + foreign_key :provider_id, :pacticipants, null: false, on_delete: :cascade |
| 14 | + foreign_key :pact_publication_id, :pact_publications, null: false, on_delete: :cascade, unique: true |
| 15 | + foreign_key :pact_version_id, :pact_versions, null: false, on_delete: :cascade |
15 | 16 | index [:provider_id, :consumer_version_id], unique: true, name: "unq_latest_ppid_prov_conver"
|
16 | 17 | index [:provider_id, :consumer_id], name: "lpp_provider_id_consumer_id_index"
|
17 | 18 | end
|
|
0 commit comments