From 73a40d35bcbffb5bb7a2c3cb44aa2f8b5165d352 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sat, 16 Mar 2024 06:44:06 +0100 Subject: [PATCH] fixed more differences --- server/backend/migration/20240317000000.go | 2 +- server/model/notification.go | 5 +++++ server/model/notification_confirmation.go | 5 +++++ server/model/notification_type.go | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/server/backend/migration/20240317000000.go b/server/backend/migration/20240317000000.go index c3bf39ab..b499daff 100644 --- a/server/backend/migration/20240317000000.go +++ b/server/backend/migration/20240317000000.go @@ -8,7 +8,7 @@ import ( ) func tablesWithWrongCOLLATE() []string { - return []string{"crontab", "devices", "dish", "files", "kino", "news", "newsSource", "notification_types"} + return []string{"crontab", "devices", "dish", "files", "kino", "news", "newsSource"} } // migrate20240317000000 diff --git a/server/model/notification.go b/server/model/notification.go index 8c93943d..31256045 100644 --- a/server/model/notification.go +++ b/server/model/notification.go @@ -26,3 +26,8 @@ type Notification struct { Signature null.String `gorm:"column:signature;type:text;size:65535;" json:"signature"` Silent int32 `gorm:"column:silent;type:tinyint;default:0;" json:"silent"` } + +// TableName sets the insert table name for this struct type +func (n *Notification) TableName() string { + return "notification" +} diff --git a/server/model/notification_confirmation.go b/server/model/notification_confirmation.go index f5b6a39c..7e20fa88 100644 --- a/server/model/notification_confirmation.go +++ b/server/model/notification_confirmation.go @@ -23,3 +23,8 @@ type NotificationConfirmation struct { Created time.Time `gorm:"column:created;type:timestamp;default:CURRENT_TIMESTAMP;" json:"created"` Received null.Time `gorm:"column:received;type:timestamp;" json:"received"` } + +// TableName sets the insert table name for this struct type +func (n *NotificationConfirmation) TableName() string { + return "notification_confirmation" +} diff --git a/server/model/notification_type.go b/server/model/notification_type.go index 7a53f240..f3f29592 100644 --- a/server/model/notification_type.go +++ b/server/model/notification_type.go @@ -21,3 +21,8 @@ type NotificationType struct { Name string `gorm:"column:name;type:text;size:65535;" json:"name"` Confirmation string `gorm:"column:confirmation;type:enum('true', 'false');default:'false';" json:"confirmation"` } + +// TableName sets the insert table name for this struct type +func (n *NotificationType) TableName() string { + return "notification_type" +}