diff options
Diffstat (limited to 'db/migrate/20190415172035_update_insights_foreign_keys.rb')
-rw-r--r-- | db/migrate/20190415172035_update_insights_foreign_keys.rb | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/db/migrate/20190415172035_update_insights_foreign_keys.rb b/db/migrate/20190415172035_update_insights_foreign_keys.rb deleted file mode 100644 index 5d3aa4c05e9..00000000000 --- a/db/migrate/20190415172035_update_insights_foreign_keys.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# rubocop: disable Migration/AddConcurrentForeignKey - -class UpdateInsightsForeignKeys < ActiveRecord::Migration[5.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - remove_foreign_key_if_exists(:insights, column: :project_id) - add_foreign_key(:insights, :projects, column: :project_id, on_delete: :cascade) - - remove_foreign_key_if_exists(:insights, column: :namespace_id) - add_foreign_key(:insights, :namespaces, column: :namespace_id, on_delete: :cascade) - end - - def down - remove_foreign_key_if_exists(:insights, column: :namespace_id) - add_foreign_key(:insights, :namespaces, column: :namespace_id) - - remove_foreign_key_if_exists(:insights, column: :project_id) - add_foreign_key(:insights, :projects, column: :project_id) - end -end |