Lines Matching +full:lookup +full:schema +(+path:plugin +path:struct) -(+path:plugin +path:struct +path:lang)
16 use dokuwiki\plugin\struct\meta\Schema;
17 use dokuwiki\plugin\struct\types\Lookup;
65 $schemas = Schema::getAll();
67 $schema = new Schema($table);
68 foreach ($schema->getColumns() as $col) {
71 $this->updateColumnID($schema, $col, $old, $new, true);
72 } elseif (get_class($col->getType()) == Lookup::class) {
73 $this->updateColumnLookup($schema, $col, $old, $new);
76 $this->updateColumnID($schema, $col, $old, $new);
101 foreach (Schema::getAll() as $tbl) {
113 * Update the page-schema assignments
143 * @param Schema $schema
149 protected function updateColumnID(Schema $schema, Column $col, $old, $new, $hashes = false)
152 $table = $schema->getTable();
172 if ($col->getType() instanceof Lookup) {
181 * Update a Lookup type column
183 * Lookups contain a page id when the referenced schema is a data schema
185 * @param Schema $schema
190 protected function updateColumnLookup(Schema $schema, Column $col, $old, $new)
193 $ref = new Schema($tconf['schema']);
194 if (!$ref->getId()) return; // this schema does not exist
195 if (!$ref->getTimeStamp()) return; // a lookup is referenced, nothing to do
196 $this->updateColumnID($schema, $col, $old, $new);