mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
Merge commit '496c10542bd39ca86a85d4de81778c134ea4383c' into glitch-soc/merge-upstream
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ChangeMentionStatusIdNonNullable < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_check_constraint :mentions, 'status_id IS NOT NULL', name: 'mentions_status_id_null', validate: false
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ValidateChangeMentionStatusIdNonNullable < ActiveRecord::Migration[7.1]
|
||||
def up
|
||||
validate_check_constraint :mentions, name: 'mentions_status_id_null'
|
||||
change_column_null :mentions, :status_id, false
|
||||
remove_check_constraint :mentions, name: 'mentions_status_id_null'
|
||||
end
|
||||
|
||||
def down
|
||||
add_check_constraint :mentions, 'status_id IS NOT NULL', name: 'mentions_status_id_null', validate: false
|
||||
change_column_null :mentions, :status_id, true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ChangeMentionAccountIdNonNullable < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_check_constraint :mentions, 'account_id IS NOT NULL', name: 'mentions_account_id_null', validate: false
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ValidateChangeMentionAccountIdNonNullable < ActiveRecord::Migration[7.1]
|
||||
def up
|
||||
validate_check_constraint :mentions, name: 'mentions_account_id_null'
|
||||
change_column_null :mentions, :account_id, false
|
||||
remove_check_constraint :mentions, name: 'mentions_account_id_null'
|
||||
end
|
||||
|
||||
def down
|
||||
add_check_constraint :mentions, 'account_id IS NOT NULL', name: 'mentions_account_id_null', validate: false
|
||||
change_column_null :mentions, :account_id, true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user