mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Allow DROP NOT NULL in pre-deploy migrations (#20775)
Our SafeMigrate system is designed to prevent tables/columns being dropped in pre-deploy migrations. Its regex-based detection was triggering incorrectly on `ALTER COLUMN DROP NOT NULL`.
This commit is contained in:
11
spec/fixtures/db/migrate/drop_not_null/20990309014015_drop_not_null.rb
vendored
Normal file
11
spec/fixtures/db/migrate/drop_not_null/20990309014015_drop_not_null.rb
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DropNotNull < ActiveRecord::Migration[5.1]
|
||||
def up
|
||||
change_column_null :users, :username, true
|
||||
end
|
||||
|
||||
def down
|
||||
raise "not tested"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user