Skip to content

Commit

Permalink
Fix import from alter statements failing
Browse files Browse the repository at this point in the history
  • Loading branch information
1ilit committed Sep 28, 2024
1 parent ff1e83b commit 935900d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/importSQL/postgres.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,13 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
) {
const relationship = {};
const startTable = e.table[0].table;
const startField = expr.create_definitions.definition[0].column;
const startField =
expr.create_definitions.definition[0].column.expr.value;
const endTable =
expr.create_definitions.reference_definition.table[0].table;
const endField =
expr.create_definitions.reference_definition.definition[0].column;
expr.create_definitions.reference_definition.definition[0].column
.expr.value;
let updateConstraint = "No action";
let deleteConstraint = "No action";
expr.create_definitions.reference_definition.on_action.forEach(
Expand Down

0 comments on commit 935900d

Please sign in to comment.