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 2, 2019
1 parent f6c3dff commit 64bc117
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 64bc117

Please sign in to comment.