Resolve issue with raw sql backticks for postgresql migrations

This commit is contained in:
idanoo 2023-01-26 22:29:54 +13:00
parent e4e7b5062a
commit 55dc9b0aaa
No known key found for this signature in database
GPG key ID: 387387CDBC02F132

View file

@ -71,7 +71,7 @@ class FixDuplicateProfiles extends Command
{
$duplicates = DB::table('profiles')
->whereNull('domain')
->select('username', DB::raw('COUNT(*) as `count`'))
->select('username', DB::raw('COUNT(*) as "count"'))
->groupBy('username')
->havingRaw('COUNT(*) > 1')
->pluck('username');