diff options
author | ThibG <thib@sitedethib.com> | 2018-08-15 20:23:12 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-08-15 20:23:12 +0200 |
commit | 4f24dc31dc58cedc3820baf258112e9bed2b3e69 (patch) | |
tree | ccad31d72d980180861f245eb11b0f28d99e5de9 | |
parent | 625b5a567bb94a557572176357cd2381ac17a06d (diff) |
Fix FixAccountsUniqueIndex migration (#8212)
-rw-r--r-- | db/migrate/20180528141303_fix_accounts_unique_index.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/db/migrate/20180528141303_fix_accounts_unique_index.rb b/db/migrate/20180528141303_fix_accounts_unique_index.rb index 624ea229e..bd4e158b7 100644 --- a/db/migrate/20180528141303_fix_accounts_unique_index.rb +++ b/db/migrate/20180528141303_fix_accounts_unique_index.rb @@ -6,6 +6,10 @@ class FixAccountsUniqueIndex < ActiveRecord::Migration[5.2] def local? domain.nil? end + + def acct + local? ? username : "#{username}@#{domain}" + end end disable_ddl_transaction! |