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.

14 lines
463 B

  1. class AddInstanceActor < ActiveRecord::Migration[5.2]
  2. class Account < ApplicationRecord
  3. # Dummy class, to make migration possible across version changes
  4. validates :username, uniqueness: { scope: :domain, case_sensitive: false }
  5. end
  6. def up
  7. Account.create!(id: -99, actor_type: 'Application', locked: true, username: Rails.configuration.x.local_domain)
  8. end
  9. def down
  10. Account.find_by(id: -99, actor_type: 'Application').destroy!
  11. end
  12. end