diff options
Diffstat (limited to 'db/migrate/20210325113129_validate_foreign_key_on_service_hooks.rb')
-rw-r--r-- | db/migrate/20210325113129_validate_foreign_key_on_service_hooks.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20210325113129_validate_foreign_key_on_service_hooks.rb b/db/migrate/20210325113129_validate_foreign_key_on_service_hooks.rb new file mode 100644 index 00000000000..17dd4cad6ae --- /dev/null +++ b/db/migrate/20210325113129_validate_foreign_key_on_service_hooks.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class ValidateForeignKeyOnServiceHooks < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + CONSTRAINT_NAME = 'fk_d47999a98a' + + def up + validate_foreign_key :web_hooks, :service_id, name: CONSTRAINT_NAME + end + + def down + # no-op + end +end |