mirror of
https://github.com/discourse/discourse.git
synced 2025-04-19 16:59:04 +08:00

SafeMigrate outputs text when we detect attempts to unsafely drop tables and columns It is unfortunately not thread safe This is not needed in production as we would have already caught it by then in our test suite.
13 lines
377 B
Ruby
13 lines
377 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_dependency 'migration/safe_migrate'
|
|
|
|
# We do not run this in production cause it is intrusive and has
|
|
# potential to break stuff, it also breaks under concurrent use
|
|
# which rake:multisite_migrate uses
|
|
#
|
|
# The protection is only needed in Dev and Test
|
|
if ENV['RAILS_ENV'] != "production"
|
|
Migration::SafeMigrate.patch_active_record!
|
|
end
|