Source code for the custom Mastodon (Glitchsoc) instance on berserker.town.
https://berserker.town/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
552 B
19 lines
552 B
# frozen_string_literal: true
|
|
|
|
class FixFeaturedTagsConstraints < ActiveRecord::Migration[6.1]
|
|
def up
|
|
safety_assured do
|
|
execute 'DELETE FROM featured_tags WHERE tag_id IS NULL'
|
|
change_column_null :featured_tags, :tag_id, false
|
|
execute 'DELETE FROM featured_tags WHERE account_id IS NULL'
|
|
change_column_null :featured_tags, :account_id, false
|
|
end
|
|
end
|
|
|
|
def down
|
|
safety_assured do
|
|
change_column_null :featured_tags, :tag_id, true
|
|
change_column_null :featured_tags, :account_id, true
|
|
end
|
|
end
|
|
end
|
|
|