Skip to content

Commit

Permalink
deffer typeorm unique constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanakram3 committed May 19, 2024
1 parent b3d3553 commit 3403dec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions assets/patches/typeorm+0.3.20.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/node_modules/typeorm/metadata-builder/RelationJoinColumnBuilder.js b/node_modules/typeorm/metadata-builder/RelationJoinColumnBuilder.js
index aefbf6f..0f96b64 100644
--- a/node_modules/typeorm/metadata-builder/RelationJoinColumnBuilder.js
+++ b/node_modules/typeorm/metadata-builder/RelationJoinColumnBuilder.js
@@ -82,6 +82,7 @@ class RelationJoinColumnBuilder {
args: {
name: this.connection.namingStrategy.relationConstraintName(relation.entityMetadata.tableName, foreignKey.columns.map((column) => column.databaseName)),
target: relation.entityMetadata.target,
+ deferrable: relation.deferrable,
},
});
uniqueConstraint.build(this.connection.namingStrategy);
2 changes: 1 addition & 1 deletion schema/token.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type CreatorToken @entity {
channel: TokenChannel @derivedFrom(field: "token")

"video for the token presentation page"
trailerVideo: [TrailerVideo!]! @derivedFrom(field: "token")
trailerVideo: TrailerVideo @derivedFrom(field: "token")

"about information displayed under the presentation video"
description: String
Expand Down

0 comments on commit 3403dec

Please sign in to comment.