/** * Removed forcing of invalid state on recentchanges_fk2. * cascading taken in account in the deleting function */ protected function doRecentchangesFK2Cascade() { $meta = $this->db->query('SELECT 1 FROM all_constraints WHERE owner = \'' . strtoupper($this->db->getDBname()) . '\' AND constraint_name = \'' . $this->db->tablePrefix() . 'RECENTCHANGES_FK2\' AND delete_rule = \'CASCADE\''); $row = $meta->fetchRow(); if ($row) { return; } $this->applyPatch('patch_recentchanges_fk2_cascade.sql', false, "Altering RECENTCHANGES_FK2"); }
/** * Fixed wrong PK, UK definition */ protected function doPageRestrictionsPKUKFix() { $this->output("Altering PAGE_RESTRICTIONS keys ... "); $meta = $this->db->query('SELECT column_name FROM all_cons_columns WHERE owner = \'' . strtoupper($this->db->getDBname()) . '\' AND constraint_name = \'' . $this->db->tablePrefix() . 'PAGE_RESTRICTIONS_PK\' AND rownum = 1'); $row = $meta->fetchRow(); if ($row['column_name'] == 'PR_ID') { $this->output("seems to be up to date.\n"); return; } $this->applyPatch('patch-page_restrictions_pkuk_fix.sql', false); $this->output("ok\n"); }