Fix importing a column from the central column list on structure add column - default value
The default value was not properly set nor was the field_default_type select Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
913a2e7ff3
commit
0729fb3597
@ -2969,13 +2969,19 @@ Functions.autoPopulate = function (inputId, offset) {
|
||||
}
|
||||
var colDefault = centralColumnList[db + '_' + table][offset].col_default.toUpperCase();
|
||||
var $input4 = $('#' + newInputId + '4');
|
||||
if (colDefault !== '' && colDefault !== 'NULL' && colDefault !== 'CURRENT_TIMESTAMP' && colDefault !== 'CURRENT_TIMESTAMP()') {
|
||||
if (colDefault === 'NULL' || colDefault === 'CURRENT_TIMESTAMP' || colDefault === 'CURRENT_TIMESTAMP()') {
|
||||
if (colDefault === 'CURRENT_TIMESTAMP()') {
|
||||
colDefault = 'CURRENT_TIMESTAMP';
|
||||
}
|
||||
$input4.val(colDefault);
|
||||
$input4.siblings('.default_value').hide();
|
||||
} if (colDefault === '') {
|
||||
$input4.val('NONE');
|
||||
$input4.siblings('.default_value').hide();
|
||||
} else {
|
||||
$input4.val('USER_DEFINED');
|
||||
$input4.siblings('.default_value').show();
|
||||
$input4.siblings('.default_value').val(centralColumnList[db + '_' + table][offset].col_default);
|
||||
} else {
|
||||
$input4.val(centralColumnList[db + '_' + table][offset].col_default);
|
||||
$input4.siblings('.default_value').hide();
|
||||
}
|
||||
$('#' + newInputId + '5').val(centralColumnList[db + '_' + table][offset].col_collation);
|
||||
var $input6 = $('#' + newInputId + '6');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user