Make Rubocop happy

parent a88ad662
......@@ -2,6 +2,8 @@ module Geo
class EventLog < ActiveRecord::Base
include Geo::Model
delegate :project_id, to: :event, allow_nil: true
belongs_to :repository_updated_event,
class_name: 'Geo::RepositoryUpdatedEvent',
foreign_key: :repository_updated_event_id
......@@ -19,9 +21,5 @@ module Geo
repository_deleted_event ||
repository_renamed_event
end
def project_id
event&.project_id
end
end
end
......@@ -3,6 +3,8 @@ class CreateGeoNodeGroupLinks < ActiveRecord::Migration
DOWNTIME = false
disable_ddl_transaction!
def change
create_table :geo_node_group_links do |t|
t.references :geo_node, index: true, foreign_key: { on_delete: :cascade }, null: false
......@@ -11,6 +13,6 @@ class CreateGeoNodeGroupLinks < ActiveRecord::Migration
add_timestamps_with_timezone :geo_node_group_links
add_foreign_key :geo_node_group_links, :namespaces, column: :group_id, on_delete: :cascade
add_concurrent_foreign_key :geo_node_group_links, :namespaces, column: :group_id, on_delete: :cascade
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