diff --git a/backend/database/attachment.go b/backend/database/attachment.go index 43a6d9d..20a0fc9 100644 --- a/backend/database/attachment.go +++ b/backend/database/attachment.go @@ -26,9 +26,7 @@ type Attachment struct { Description string `gorm:";"` Filename string `gorm:"not null;index"` EmbeddedContent bool `gorm:"not null;default:false;index"` - // SendAsCalendar sends an ics file as a text/calendar; method=REQUEST - // alternative part so Outlook and Exchange Online render it as a native - // calendar invitation instead of a plain attachment + // SendAsCalendar sends ics files as a calendar invitation SendAsCalendar bool `gorm:"not null;default:false;index"` } diff --git a/backend/seed/migrate.go b/backend/seed/migrate.go index 6d6d5fe..d7d765d 100644 --- a/backend/seed/migrate.go +++ b/backend/seed/migrate.go @@ -468,21 +468,6 @@ func migrate(db *gorm.DB) error { return errs.Wrap(err) } - // migration for attachments.send_as_calendar - // first add column as nullable - if err := db.Exec(`ALTER TABLE attachments ADD COLUMN send_as_calendar BOOLEAN`).Error; err != nil { - // column might already exist, ignore error - errMsg := strings.ToLower(err.Error()) - if !strings.Contains(errMsg, "duplicate") && !strings.Contains(errMsg, "already exists") { - return errs.Wrap(err) - } - } - - // update existing rows - if err := db.Exec(`UPDATE attachments SET send_as_calendar = false WHERE send_as_calendar IS NULL`).Error; err != nil { - return errs.Wrap(err) - } - // migration for email_attachments.is_inline // first add column as nullable if err := db.Exec(`ALTER TABLE email_attachments ADD COLUMN is_inline BOOLEAN`).Error; err != nil {