Skip to content
Snippets Groups Projects
Unverified Commit c0e87ad8 authored by Claire's avatar Claire Committed by GitHub
Browse files

Update strong-migrations-enabled migrations from 5.0 and 5.1 to 5.2 (#24275)

parent cf12621e
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 20 deletions
class AddDescriptionToMediaAttachments < ActiveRecord::Migration[5.1] class AddDescriptionToMediaAttachments < ActiveRecord::Migration[5.2]
def change def change
add_column :media_attachments, :description, :text add_column :media_attachments, :description, :text
end end
......
class CreateEmailDomainBlocks < ActiveRecord::Migration[5.1] class CreateEmailDomainBlocks < ActiveRecord::Migration[5.2]
def change def change
create_table :email_domain_blocks do |t| create_table :email_domain_blocks do |t|
t.string :domain, null: false t.string :domain, null: false
......
class CreateAccountModerationNotes < ActiveRecord::Migration[5.1] class CreateAccountModerationNotes < ActiveRecord::Migration[5.2]
def change def change
create_table :account_moderation_notes do |t| create_table :account_moderation_notes do |t|
t.text :content, null: false t.text :content, null: false
......
require Rails.root.join('lib', 'mastodon', 'migration_helpers') require Rails.root.join('lib', 'mastodon', 'migration_helpers')
class AddDisabledToCustomEmojis < ActiveRecord::Migration[5.1] class AddDisabledToCustomEmojis < ActiveRecord::Migration[5.2]
include Mastodon::MigrationHelpers include Mastodon::MigrationHelpers
disable_ddl_transaction! disable_ddl_transaction!
......
class AddUriToCustomEmojis < ActiveRecord::Migration[5.1] class AddUriToCustomEmojis < ActiveRecord::Migration[5.2]
def change def change
add_column :custom_emojis, :uri, :string add_column :custom_emojis, :uri, :string
add_column :custom_emojis, :image_remote_url, :string add_column :custom_emojis, :image_remote_url, :string
......
class AddForeignKeyToAccountModerationNotes < ActiveRecord::Migration[5.1] class AddForeignKeyToAccountModerationNotes < ActiveRecord::Migration[5.2]
def change def change
safety_assured { add_foreign_key :account_moderation_notes, :accounts } safety_assured { add_foreign_key :account_moderation_notes, :accounts }
end end
......
class ChangeAccountsNonnullableInAccountModerationNotes < ActiveRecord::Migration[5.1] class ChangeAccountsNonnullableInAccountModerationNotes < ActiveRecord::Migration[5.2]
def change def change
safety_assured do safety_assured do
change_column_null :account_moderation_notes, :account_id, false change_column_null :account_moderation_notes, :account_id, false
......
class AddVisibleInPickerToCustomEmoji < ActiveRecord::Migration[5.1] class AddVisibleInPickerToCustomEmoji < ActiveRecord::Migration[5.2]
def change def change
safety_assured do safety_assured do
add_column :custom_emojis, :visible_in_picker, :boolean, default: true, null: false add_column :custom_emojis, :visible_in_picker, :boolean, default: true, null: false
......
require Rails.root.join('lib', 'mastodon', 'migration_helpers') require Rails.root.join('lib', 'mastodon', 'migration_helpers')
class AddReblogsToFollows < ActiveRecord::Migration[5.1] class AddReblogsToFollows < ActiveRecord::Migration[5.2]
include Mastodon::MigrationHelpers include Mastodon::MigrationHelpers
disable_ddl_transaction! disable_ddl_transaction!
......
require Rails.root.join('lib', 'mastodon', 'migration_helpers') require Rails.root.join('lib', 'mastodon', 'migration_helpers')
class AddMemorialToAccounts < ActiveRecord::Migration[5.1] class AddMemorialToAccounts < ActiveRecord::Migration[5.2]
include Mastodon::MigrationHelpers include Mastodon::MigrationHelpers
disable_ddl_transaction! disable_ddl_transaction!
......
require Rails.root.join('lib', 'mastodon', 'migration_helpers') require Rails.root.join('lib', 'mastodon', 'migration_helpers')
class AddDisabledToUsers < ActiveRecord::Migration[5.1] class AddDisabledToUsers < ActiveRecord::Migration[5.2]
include Mastodon::MigrationHelpers include Mastodon::MigrationHelpers
disable_ddl_transaction! disable_ddl_transaction!
......
require Rails.root.join('lib', 'mastodon', 'migration_helpers') require Rails.root.join('lib', 'mastodon', 'migration_helpers')
class AddModeratorToAccounts < ActiveRecord::Migration[5.1] class AddModeratorToAccounts < ActiveRecord::Migration[5.2]
include Mastodon::MigrationHelpers include Mastodon::MigrationHelpers
disable_ddl_transaction! disable_ddl_transaction!
......
class AddIndexDomainToEmailDomainBlocks < ActiveRecord::Migration[5.1] class AddIndexDomainToEmailDomainBlocks < ActiveRecord::Migration[5.2]
disable_ddl_transaction! disable_ddl_transaction!
def change def change
......
class CreateLists < ActiveRecord::Migration[5.1] class CreateLists < ActiveRecord::Migration[5.2]
def change def change
create_table :lists do |t| create_table :lists do |t|
t.references :account, foreign_key: { on_delete: :cascade } t.references :account, foreign_key: { on_delete: :cascade }
......
class CreateListAccounts < ActiveRecord::Migration[5.1] class CreateListAccounts < ActiveRecord::Migration[5.2]
def change def change
create_table :list_accounts do |t| create_table :list_accounts do |t|
t.belongs_to :list, foreign_key: { on_delete: :cascade }, null: false t.belongs_to :list, foreign_key: { on_delete: :cascade }, null: false
......
class AddMovedToAccountIdToAccounts < ActiveRecord::Migration[5.1] class AddMovedToAccountIdToAccounts < ActiveRecord::Migration[5.2]
def change def change
add_column :accounts, :moved_to_account_id, :bigint, null: true, default: nil add_column :accounts, :moved_to_account_id, :bigint, null: true, default: nil
safety_assured { add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify } safety_assured { add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify }
......
class CreateAdminActionLogs < ActiveRecord::Migration[5.1] class CreateAdminActionLogs < ActiveRecord::Migration[5.2]
def change def change
create_table :admin_action_logs do |t| create_table :admin_action_logs do |t|
t.belongs_to :account, foreign_key: { on_delete: :cascade } t.belongs_to :account, foreign_key: { on_delete: :cascade }
......
class AddIndexAccountAndReblogOfIdToStatuses < ActiveRecord::Migration[5.1] class AddIndexAccountAndReblogOfIdToStatuses < ActiveRecord::Migration[5.2]
disable_ddl_transaction! disable_ddl_transaction!
def up def up
......
class CreateInvites < ActiveRecord::Migration[5.1] class CreateInvites < ActiveRecord::Migration[5.2]
def change def change
create_table :invites do |t| create_table :invites do |t|
t.belongs_to :user, foreign_key: { on_delete: :cascade } t.belongs_to :user, foreign_key: { on_delete: :cascade }
......
class AddInviteIdToUsers < ActiveRecord::Migration[5.1] class AddInviteIdToUsers < ActiveRecord::Migration[5.2]
def change def change
safety_assured { add_reference :users, :invite, null: true, default: nil, foreign_key: { on_delete: :nullify }, index: false } safety_assured { add_reference :users, :invite, null: true, default: nil, foreign_key: { on_delete: :nullify }, index: false }
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment