mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 08:41:12 +01:00
16 lines
386 B
Ruby
16 lines
386 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddEmbedURLToPreviewCards < ActiveRecord::Migration[5.2]
|
|
disable_ddl_transaction!
|
|
|
|
def up
|
|
safety_assured do
|
|
add_column :preview_cards, :embed_url, :string, default: '', null: false
|
|
end
|
|
end
|
|
|
|
def down
|
|
execute "UPDATE preview_cards SET url=embed_url WHERE embed_url!=''"
|
|
remove_column :preview_cards, :embed_url
|
|
end
|
|
end
|