Skip to content

Commit

Permalink
Update db_schema.php
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter authored Dec 30, 2023
1 parent e9f0957 commit 8e452e0
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions upload/admin/controller/extension/report/db_schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,26 +221,7 @@ public function getReport(): ?object {
}
}
}

// Foreign extensions
foreach ($foreign_extension_data as $key => $val) {
if (json_validate($key)) {
$key_data = json_decode($key, true);

$fields = $this->model_extension_report_db_schema->getTable($key_data['table']);

foreach ($fields as $result) {
if ($result['Column_name'] == $key_data['field']) {
$data['tables'][$result['TABLE_NAME'] . '|extension'][] = [
'name' => $result['Column_name'],
'previous_type' => $result['COLUMN_TYPE'],
'type' => $result['COLUMN_TYPE']
];
}
}
}
}


// Extension fields from core tables
$fields = $this->model_extension_report_db_schema->getTable($table['name']);

Expand Down Expand Up @@ -273,6 +254,25 @@ public function getReport(): ?object {
}
}

// Foreign extensions
foreach ($foreign_extension_data as $key => $val) {
if (json_validate($key)) {
$key_data = json_decode($key, true);

$fields = $this->model_extension_report_db_schema->getTable($key_data['table']);

foreach ($fields as $result) {
if ($result['Column_name'] == $key_data['field']) {
$data['tables'][$result['TABLE_NAME'] . '|extension'][] = [
'name' => $result['Column_name'],
'previous_type' => $result['COLUMN_TYPE'],
'type' => $result['COLUMN_TYPE']
];
}
}
}
}

$this->response->setOutput($this->load->view('extension/report/db_schema_report', $data));
} else {
return new \Action('error/permission');
Expand Down

0 comments on commit 8e452e0

Please sign in to comment.