- added "deprecated" table columns to /setup "Database" section
This commit is contained in:
@@ -1165,6 +1165,21 @@ class Setup extends Controller {
|
||||
$currentColumns = $tableModifierTemp->getCols(true);
|
||||
// get row count
|
||||
$tableRows = $db->getRowCount($requiredTableName);
|
||||
|
||||
|
||||
// find deprecated columns that are no longer needed ------------------------------------------
|
||||
$deprecatedColumnNames = array_diff(array_keys($currentColumns), array_keys($data['fieldConf']), ['id']);
|
||||
foreach($deprecatedColumnNames as $deprecatedColumnName){
|
||||
$requiredTables[$requiredTableName]['fieldConf'][$deprecatedColumnName]['deprecated'] = true;
|
||||
$requiredTables[$requiredTableName]['fieldConf'][$deprecatedColumnName]['currentType'] = 'deprecated';
|
||||
//$requiredTables[$requiredTableName]['fieldConf'][$deprecatedColumnName]['statusCheck'] = false;
|
||||
//$tableStatusCheckCount++;
|
||||
|
||||
//$tableModifierTemp->dropColumn($deprecatedColumnName);
|
||||
}
|
||||
|
||||
//$buildStatus = $tableModifierTemp->build(false);
|
||||
//$dbColumnQueries = array_merge($dbColumnQueries, (array)$buildStatus);
|
||||
}else{
|
||||
// table missing
|
||||
$dbStatusCheckCount++;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -652,6 +652,7 @@
|
||||
</tr>
|
||||
<repeat group="{{ @tableData.fieldConf }}" key="{{ @columnName }}" value="{{ @columnData }}" counter="{{ @countCol }}">
|
||||
<check if="{{ @columnData.type }}">
|
||||
{* Required colums *}
|
||||
<tr class="{{ @dbInformation.info.name }}_{{ @tableName }}_col collapse">
|
||||
<td class="text-right bg-color bg-color-tealDarker">{{@countCol}}.</td>
|
||||
<td class="bg-color bg-color-tealDarker">{{ @columnName }}</td>
|
||||
@@ -745,6 +746,25 @@
|
||||
</td>
|
||||
</tr>
|
||||
</check>
|
||||
<check if="{{ @columnData.deprecated }}">
|
||||
{* Deprecated colums *}
|
||||
<tr class="{{ @dbInformation.info.name }}_{{ @tableName }}_col collapse txt-color txt-color-yellowDark">
|
||||
<td class="bg-color bg-color-tealDarker"></td>
|
||||
<td class="bg-color bg-color-tealDarker">{{ @columnName }}</td>
|
||||
<td class="bg-color bg-color-tealDarker text-center">
|
||||
<i class="fas fa-fw fa-bolt"></i>
|
||||
</td>
|
||||
<td class="bg-color bg-color-tealDarker">
|
||||
<kbd class="txt-color txt-color-yellowDark">{{ @columnData.currentType }}</kbd>
|
||||
</td>
|
||||
<td class="bg-color bg-color-tealDarker"></td>
|
||||
<td class="bg-color bg-color-tealDarker"></td>
|
||||
<td class="bg-color bg-color-tealDarker"></td>
|
||||
<td class="bg-color bg-color-tealDarker text-right">
|
||||
<i class="fas fa-fw fa-exclamation-triangle"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</check>
|
||||
</repeat>
|
||||
</check>
|
||||
|
||||
|
||||
@@ -711,6 +711,10 @@
|
||||
|
||||
// setup page -----------------------------------------------------------------
|
||||
.pf-body[data-script='setup']{
|
||||
body{
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.navbar-brand:hover{
|
||||
color: #777; // overwrite default
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user