From d583d559d17267911fbde32e5b98be29fecf5680 Mon Sep 17 00:00:00 2001 From: Julien Riou Date: Wed, 7 Apr 2021 08:46:09 +0200 Subject: [PATCH] Bugfix Twitter foreign key Signed-off-by: Julien Riou --- notifier_twitter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifier_twitter.go b/notifier_twitter.go index 560e056..4456db9 100644 --- a/notifier_twitter.go +++ b/notifier_twitter.go @@ -21,7 +21,7 @@ type Tweet struct { gorm.Model TweetID int64 ProductURL string - Product Product `gorm:"foreignKey:ProductURL"` + Product Product `gorm:"not null;references:URL"` } // TwitterNotifier to manage notifications to Twitter