Merge remote-tracking branch 'parent/main' into upstream-20240218
This commit is contained in:
commit
7684b5de6f
47 changed files with 412 additions and 115 deletions
|
@ -5,6 +5,8 @@ class AddInstanceActor < ActiveRecord::Migration[5.2]
|
|||
# Dummy class, to make migration possible across version changes
|
||||
validates :username, uniqueness: { scope: :domain, case_sensitive: false }
|
||||
|
||||
INSTANCE_ACTOR_ID = -99
|
||||
|
||||
before_create :generate_keys
|
||||
|
||||
def generate_keys
|
||||
|
@ -15,10 +17,10 @@ class AddInstanceActor < ActiveRecord::Migration[5.2]
|
|||
end
|
||||
|
||||
def up
|
||||
Account.create!(id: -99, actor_type: 'Application', locked: true, username: Rails.configuration.x.local_domain)
|
||||
Account.create!(id: Account::INSTANCE_ACTOR_ID, actor_type: 'Application', locked: true, username: Rails.configuration.x.local_domain)
|
||||
end
|
||||
|
||||
def down
|
||||
Account.find_by(id: -99, actor_type: 'Application').destroy!
|
||||
Account.find_by(id: Account::INSTANCE_ACTOR_ID, actor_type: 'Application').destroy!
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue