Files
GoMFT/internal/db/migrations/add_google_drive_authenticated.go
T
StarFleetCPTN 8607f2098a feat: Integrate Google Drive support and enhance configuration handling
- 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.
2025-03-15 17:36:36 -07:00

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
},
}
}