Skip to content

Commit

Permalink
Fixed postgres real good this time
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed May 1, 2019
1 parent f6c3dff commit 8ea412e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Dev/FixFolderPermissionsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ class FixFolderPermissionsHelper
*/
public function run()
{
SQLUpdate::create(
'"' . File::singleton()->baseTable() . '"',
['CanViewType' => 'Inherit'],
['ISNULL("CanViewType")', 'ClassName' => Folder::class]
)->execute();
SQLUpdate::create()
->setTable('"' . File::singleton()->baseTable() . '"')
->setAssignments(['CanViewType' => 'Inherit'])
->setWhere([
'"CanViewType" IS NULL',
'ClassName' => Folder::class
])
->execute();

// This part won't work if run from the CLI, because Apache and the CLI don't share the same cache.
InheritedPermissionFlusher::flush();
Expand Down

0 comments on commit 8ea412e

Please sign in to comment.