Skip to content

Commit

Permalink
feat: sqlite - deferrable options for foreign keys (#9360)
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavomick committed Sep 14, 2022
1 parent 52e5f7c commit 773a4fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,8 @@ export abstract class AbstractSqliteQueryRunner
let constraint = `CONSTRAINT "${fk.name}" FOREIGN KEY (${columnNames}) REFERENCES "${referencedTable}" (${referencedColumnNames})`
if (fk.onDelete) constraint += ` ON DELETE ${fk.onDelete}`
if (fk.onUpdate) constraint += ` ON UPDATE ${fk.onUpdate}`
if (fk.deferrable)
constraint += ` DEFERRABLE ${fk.deferrable}`

return constraint
})
Expand Down

0 comments on commit 773a4fe

Please sign in to comment.