File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
78
78
}
79
79
} else if ( d . default_val . value . type === "null" ) {
80
80
defaultValue = "NULL" ;
81
+ } else if ( d . default_val . value . type === "cast" ) {
82
+ defaultValue = d . default_val . value . expr . value ;
81
83
} else {
82
84
defaultValue = d . default_val . value . value . toString ( ) ;
83
85
}
@@ -278,7 +280,8 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
278
280
e . expr . forEach ( ( expr ) => {
279
281
if (
280
282
expr . action === "add" &&
281
- expr . create_definitions . constraint_type . toLowerCase ( ) === "foreign key"
283
+ expr . create_definitions . constraint_type . toLowerCase ( ) ===
284
+ "foreign key"
282
285
) {
283
286
const relationship = { } ;
284
287
const startTable = e . table [ 0 ] . table ;
You can’t perform that action at this time.
0 commit comments