mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-24 09:18:06 +01:00
ac583fce21
* Fix some old migration scripts * Fix edge case in two-step migration from older releases
14 lines
463 B
Ruby
14 lines
463 B
Ruby
class AddInstanceActor < ActiveRecord::Migration[5.2]
|
|
class Account < ApplicationRecord
|
|
# Dummy class, to make migration possible across version changes
|
|
validates :username, uniqueness: { scope: :domain, case_sensitive: false }
|
|
end
|
|
|
|
def up
|
|
Account.create!(id: -99, actor_type: 'Application', locked: true, username: Rails.configuration.x.local_domain)
|
|
end
|
|
|
|
def down
|
|
Account.find_by(id: -99, actor_type: 'Application').destroy!
|
|
end
|
|
end
|