mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-05-25 11:09:11 +00:00
fix table default value bug
This commit is contained in:
parent
3cb37beed1
commit
e4940f907f
@ -184,6 +184,11 @@ export default function Table(props) {
|
||||
</div>
|
||||
</div>
|
||||
{tableData.fields.map((e, i) => {
|
||||
|
||||
if (e.default.name && e.default.name[0].value && e.default.name[0].value === 'CURRENT_TIMESTAMP') {
|
||||
e.default = 'CURRENT_TIMESTAMP'
|
||||
}
|
||||
|
||||
return settings.showFieldSummary ? (
|
||||
<Popover
|
||||
key={i}
|
||||
@ -216,7 +221,7 @@ export default function Table(props) {
|
||||
)}
|
||||
<p>
|
||||
<strong>Default: </strong>
|
||||
{e.default === "" ? "Not set" : e.default}
|
||||
{e.default === "" ? "Not set" : e.default + ''}
|
||||
</p>
|
||||
<p>
|
||||
<strong>Comment: </strong>
|
||||
|
@ -46,6 +46,7 @@ export function astToDiagram(ast) {
|
||||
const relationships = [];
|
||||
|
||||
ast.forEach((e) => {
|
||||
console.log(e)
|
||||
if (e.type === "create") {
|
||||
if (e.keyword === "table") {
|
||||
const table = {};
|
||||
|
Loading…
Reference in New Issue
Block a user