diff --git a/rails_application/db/migrate/20230906105318_validate_add_foreign_key_on_event_id_to_event_store_events_in_streams.rb b/rails_application/db/migrate/20230906105318_validate_add_foreign_key_on_event_id_to_event_store_events_in_streams.rb new file mode 100644 index 000000000..2b4be411f --- /dev/null +++ b/rails_application/db/migrate/20230906105318_validate_add_foreign_key_on_event_id_to_event_store_events_in_streams.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class ValidateAddForeignKeyOnEventIdToEventStoreEventsInStreams < ActiveRecord::Migration[7.0] + def change + validate_foreign_key :event_store_events_in_streams, :event_store_events, column: :event_id, primary_key: :event_id + end +end diff --git a/rails_application/db/schema.rb b/rails_application/db/schema.rb index 6155581fa..6a06abb5d 100644 --- a/rails_application/db/schema.rb +++ b/rails_application/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_09_06_105317) do +ActiveRecord::Schema[7.0].define(version: 2023_09_06_105318) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql"