Commit 8747f29d authored by Timothy Andrew's avatar Timothy Andrew

Fix `ON DELETE CASCADE` migrations.

Incorrect syntax.
parent 9691d7e2
...@@ -25,7 +25,7 @@ class AddTableIssueMetrics < ActiveRecord::Migration ...@@ -25,7 +25,7 @@ class AddTableIssueMetrics < ActiveRecord::Migration
def change def change
create_table :issue_metrics do |t| create_table :issue_metrics do |t|
t.references :issue, index: { name: "index_issue_metrics" }, foreign_key: true, dependent: :delete, null: false t.references :issue, index: { name: "index_issue_metrics" }, foreign_key: { on_delete: :cascade }, null: false
t.datetime 'first_mentioned_in_commit_at' t.datetime 'first_mentioned_in_commit_at'
t.datetime 'first_associated_with_milestone_at' t.datetime 'first_associated_with_milestone_at'
......
...@@ -25,7 +25,7 @@ class AddTableMergeRequestMetrics < ActiveRecord::Migration ...@@ -25,7 +25,7 @@ class AddTableMergeRequestMetrics < ActiveRecord::Migration
def change def change
create_table :merge_request_metrics do |t| create_table :merge_request_metrics do |t|
t.references :merge_request, index: { name: "index_merge_request_metrics" }, foreign_key: true, dependent: :delete, null: false t.references :merge_request, index: { name: "index_merge_request_metrics" }, foreign_key: { on_delete: :cascade }, null: false
t.datetime 'latest_build_started_at' t.datetime 'latest_build_started_at'
t.datetime 'latest_build_finished_at' t.datetime 'latest_build_finished_at'
......
...@@ -25,8 +25,8 @@ class CreateMergeRequestsClosingIssues < ActiveRecord::Migration ...@@ -25,8 +25,8 @@ class CreateMergeRequestsClosingIssues < ActiveRecord::Migration
def change def change
create_table :merge_requests_closing_issues do |t| create_table :merge_requests_closing_issues do |t|
t.references :merge_request, foreign_key: true, index: true, dependent: :delete, null: false t.references :merge_request, foreign_key: { on_delete: :cascade }, index: true, null: false
t.references :issue, foreign_key: true, index: true, dependent: :delete, null: false t.references :issue, foreign_key: { on_delete: :cascade }, index: true, null: false
t.timestamps null: false t.timestamps null: false
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment