mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-08 15:41:20 +02:00
- Upgraded `golang.org/x/crypto` to v0.36.0 and other indirect dependencies to their latest versions. - Added functionality to assign admin roles to users upon creation in the main application logic. - Introduced new templates for admin role management, including forms for creating and editing roles. - Removed deprecated admin tools template to streamline the admin interface. - Added audit logging for role changes to improve tracking and accountability.
25 lines
644 B
Go
25 lines
644 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
|
|
)
|
|
|
|
return gormigrate.New(db, gormigrate.DefaultOptions, migrations)
|
|
}
|