mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-20 13:30:51 +02:00
- Add Google Drive as a source and destination option in the configuration forms. - Implement Google Drive authentication flow and token management. - Update job and configuration handlers to support Google Drive-specific settings. - Enhance UI components to include Google Drive configuration templates. - Introduce new tests for Google Drive integration and ensure proper handling of authentication and configuration. - Update database migrations to accommodate new fields related to Google Drive configurations.
22 lines
756 B
Go
22 lines
756 B
Go
package migrations
|
|
|
|
import (
|
|
"github.com/go-gormigrate/gormigrate/v2"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// AddGoogleDriveAuthenticated adds the GoogleDriveAuthenticated field to the transfer_configs table
|
|
func AddGoogleDriveAuthenticated() *gormigrate.Migration {
|
|
return &gormigrate.Migration{
|
|
ID: "20240315_add_google_drive_authenticated",
|
|
Migrate: func(tx *gorm.DB) error {
|
|
// Add the GoogleDriveAuthenticated column with a default value of false
|
|
return tx.Exec("ALTER TABLE transfer_configs ADD COLUMN google_drive_authenticated BOOLEAN DEFAULT false").Error
|
|
},
|
|
Rollback: func(tx *gorm.DB) error {
|
|
// Remove the GoogleDriveAuthenticated column
|
|
return tx.Exec("ALTER TABLE transfer_configs DROP COLUMN google_drive_authenticated").Error
|
|
},
|
|
}
|
|
}
|