summaryrefslogtreecommitdiffstats
path: root/db/migrate/20230725213448_add_image_description_to_preview_cards.rb
blob: 03020db655a0cfb287015ca0a7503ca86b945b2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require Rails.root.join('lib', 'mastodon', 'migration_helpers')

class AddImageDescriptionToPreviewCards < ActiveRecord::Migration[7.0]
  include Mastodon::MigrationHelpers

  disable_ddl_transaction!

  def up
    safety_assured { add_column_with_default :preview_cards, :image_description, :string, default: '', allow_null: false }
  end

  def down
    remove_column :preview_cards, :image_description
  end
end