mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-08 15:41:20 +02:00
- Updated notification service models to use pointers for boolean fields, allowing for better handling of enabled states. - Introduced helper methods for getting and setting enabled states in notification and auth provider models. - Refactored notification form templates to consolidate event trigger handling, improving code maintainability. - Added SSL verification configuration to the application settings, allowing users to skip SSL verification for outgoing notifications. - Enhanced the notification sending logic to respect the SSL verification setting. - Introduced new migration to alter boolean defaults in the database schema for better compatibility with the updated models. - Added unit tests for email and Rclone service functionalities to ensure reliability.
30 lines
844 B
Go
30 lines
844 B
Go
package migrations
|
|
|
|
import (
|
|
"github.com/go-gormigrate/gormigrate/v2"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
var migrations []*gormigrate.Migration
|
|
|
|
// GetMigrations returns all migrations
|
|
func GetMigrations(db *gorm.DB) *gormigrate.Gormigrate {
|
|
// Add all migrations in order
|
|
migrations = append(migrations,
|
|
InitialSchema(), // 001
|
|
UpdateGDriveType(), // 002
|
|
Add2FA(), // 003
|
|
AddAuditLogs(), // 004
|
|
AddDefaultRoles(), // 005
|
|
AddTimestampsToJobHistories(), // 006
|
|
AddNotificationServices(), // 007
|
|
AddUserNotifications(), // 008
|
|
AddRcloneTables(), // 009
|
|
AddRcloneCommandToConfig(), // 010
|
|
AddAuthProviders(), // 011
|
|
AlterBooleanDefaults(), // 012
|
|
)
|
|
|
|
return gormigrate.New(db, gormigrate.DefaultOptions, migrations)
|
|
}
|