Skip to content

Commit

Permalink
fixed the migration being not up to the model
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 14, 2024
1 parent a7046b8 commit 6339e9e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions server/backend/migration/20241024000000.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@ package migration

import (
"github.com/go-gormigrate/gormigrate/v2"
"github.com/guregu/null"
"gorm.io/gorm"
)

type newStudentCouncil struct {
gorm.Model
Name string `gorm:"type:varchar(100)"`
Language string `gorm:"type:enum('German','English');default:'German'"`
Description string
Name string
Language string `gorm:"type:enum('German','English');default:'German'"`
Description null.String
LinkUrl null.String `gorm:"type:varchar(190);unique;"`
ImageID null.Int
Image *File `gorm:"foreignKey:ImageID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
ImageCaption null.String
StudentCouncilCollectionID uint
StudentCouncilCollection newStudentCouncilCollection `gorm:"foreignKey:StudentCouncilCollectionID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

// TableName sets the insert table name for this struct type
Expand Down

0 comments on commit 6339e9e

Please sign in to comment.