diff --git a/admin/migration/v18Privileges.php b/admin/migration/v18Privileges.php index 73c6f19801aed0e0db87bfd0befea4631be45a85..e185ae6a43caec9697eb0f46345fbca67c157112 100644 --- a/admin/migration/v18Privileges.php +++ b/admin/migration/v18Privileges.php @@ -16,22 +16,7 @@ class v18Privileges extends AbstractMigration public function utile(): bool { - if (!$this->manager->hasTable('SAVE_V18_PRIVILEGE')) { - return false; - } - - $sql = " - SELECT - count(*) c - FROM - privilege p - JOIN categorie_privilege cp ON cp.id = p.categorie_id - WHERE - cp.code = 'enseignement' - AND p.code = 'visualisation' - "; - - return $this->manager->getBdd()->select($sql)[0]['C'] == '1'; + return $this->manager->hasTable('SAVE_V18_PRIVILEGE'); }