Browse Source

Merge pull request #4122 from idanoo/dev

Resolve issue with backticks in raw SQL for postgresql migrations
daniel 2 năm trước cách đây
mục cha
commit
262db2778f

+ 1 - 1
app/Console/Commands/FixDuplicateProfiles.php

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