Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: defer typeorm unique constraints #332

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading