mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
parent
c87940ae42
commit
b24456788c
@ -183,9 +183,7 @@ const ColumnEditor = ({
|
|||||||
<div className="col-xs-6">
|
<div className="col-xs-6">
|
||||||
<select
|
<select
|
||||||
className="input-sm form-control"
|
className="input-sm form-control"
|
||||||
value={
|
value={selectedProperties[colName].isUnique}
|
||||||
selectedProperties[colName].uniqueConstraint ? 'true' : 'false'
|
|
||||||
}
|
|
||||||
onChange={toggleColumnUnique}
|
onChange={toggleColumnUnique}
|
||||||
disabled={columnProperties.pkConstraint}
|
disabled={columnProperties.pkConstraint}
|
||||||
data-test="edit-col-unique"
|
data-test="edit-col-unique"
|
||||||
|
@ -50,7 +50,8 @@ const ColumnEditorList = ({
|
|||||||
type: col.data_type !== 'USER-DEFINED' ? col.data_type : col.udt_name,
|
type: col.data_type !== 'USER-DEFINED' ? col.data_type : col.udt_name,
|
||||||
isNullable: col.is_nullable === 'YES',
|
isNullable: col.is_nullable === 'YES',
|
||||||
pkConstraint: columnPKConstraints[colName],
|
pkConstraint: columnPKConstraints[colName],
|
||||||
uniqueConstraint: columnUniqueConstraints[colName],
|
isUnique: columnUniqueConstraints[colName] ? true : false,
|
||||||
|
// uniqueConstraint: columnUniqueConstraints[colName],
|
||||||
default: col.column_default || '',
|
default: col.column_default || '',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -85,7 +86,7 @@ const ColumnEditorList = ({
|
|||||||
propertiesList.push('primary key');
|
propertiesList.push('primary key');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (columnProperties.uniqueConstraint) {
|
if (columnProperties.isUnique) {
|
||||||
propertiesList.push('unique');
|
propertiesList.push('unique');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user