Merge remote-tracking branch 'parent/main' into upstream-20230105
This commit is contained in:
commit
a0a3d1b101
65 changed files with 1008 additions and 453 deletions
|
@ -22,11 +22,9 @@ class TruncatePreviewCards < ActiveRecord::Migration[5.1]
|
|||
end
|
||||
|
||||
def down
|
||||
if ActiveRecord::Base.connection.table_exists? 'deprecated_preview_cards'
|
||||
drop_table :preview_cards
|
||||
rename_table :deprecated_preview_cards, :preview_cards
|
||||
else
|
||||
raise ActiveRecord::IrreversibleMigration, 'Previous preview cards table has already been removed'
|
||||
end
|
||||
raise ActiveRecord::IrreversibleMigration, 'Previous preview cards table has already been removed' unless ActiveRecord::Base.connection.table_exists? 'deprecated_preview_cards'
|
||||
|
||||
drop_table :preview_cards
|
||||
rename_table :deprecated_preview_cards, :preview_cards
|
||||
end
|
||||
end
|
||||
|
|
|
@ -105,7 +105,7 @@ class MigrateAccountConversations < ActiveRecord::Migration[5.2]
|
|||
end
|
||||
end
|
||||
|
||||
notifications_about_direct_statuses.includes(:account, mention: { status: [:account, mentions: :account] }).find_each do |notification|
|
||||
notifications_about_direct_statuses.includes(:account, mention: { status: [:account, { mentions: :account }] }).find_each do |notification|
|
||||
MigrationAccountConversation.add_status(notification.account, notification.target_status)
|
||||
migrated += 1
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ class PreserveOldLayoutForExistingUsers < ActiveRecord::Migration[5.2]
|
|||
# on the to-be-changed default
|
||||
|
||||
User.where(User.arel_table[:current_sign_in_at].gteq(1.month.ago)).find_each do |user|
|
||||
next if Setting.unscoped.where(thing_type: 'User', thing_id: user.id, var: 'advanced_layout').exists?
|
||||
next if Setting.unscoped.exists?(thing_type: 'User', thing_id: user.id, var: 'advanced_layout')
|
||||
|
||||
user.settings.advanced_layout = true
|
||||
end
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddAllowWithApprovalToEmailDomainBlocks < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_column :email_domain_blocks, :allow_with_approval, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue