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) {
7878 }
7979 } else if ( d . default_val . value . type === "null" ) {
8080 defaultValue = "NULL" ;
81+ } else if ( d . default_val . value . type === "cast" ) {
82+ defaultValue = d . default_val . value . expr . value ;
8183 } else {
8284 defaultValue = d . default_val . value . value . toString ( ) ;
8385 }
@@ -278,7 +280,8 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
278280 e . expr . forEach ( ( expr ) => {
279281 if (
280282 expr . action === "add" &&
281- expr . create_definitions . constraint_type . toLowerCase ( ) === "foreign key"
283+ expr . create_definitions . constraint_type . toLowerCase ( ) ===
284+ "foreign key"
282285 ) {
283286 const relationship = { } ;
284287 const startTable = e . table [ 0 ] . table ;
You can’t perform that action at this time.
0 commit comments