Skip to content

Commit

Permalink
Merge branch 'main' into missing-dish-rating-fks
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm authored Sep 24, 2024
2 parents 16e331e + e752e0a commit 3c4141d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
20 changes: 4 additions & 16 deletions server/backend/migration/20241023000000.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,19 @@ func migrate20241023000000() *gormigrate.Migration {
return &gormigrate.Migration{
ID: "20241023000000",
Migrate: func(tx *gorm.DB) error {
if err := tx.Migrator().DropTable(InitialStudentClub{}); err != nil {
if err := tx.Migrator().DropTable(&InitialStudentClub{}, &InitialStudentClubCollection{}); err != nil {
return err
}
if err := tx.Migrator().DropTable(InitialStudentClubCollection{}); err != nil {
return err
}
if err := tx.Migrator().AutoMigrate(newStudentClubCollection{}); err != nil {
return err
}
if err := tx.Migrator().AutoMigrate(newStudentClub{}); err != nil {
if err := tx.Migrator().AutoMigrate(&newStudentClubCollection{}, &newStudentClub{}); err != nil {
return err
}
return nil
},
Rollback: func(tx *gorm.DB) error {
if err := tx.Migrator().DropTable(newStudentClub{}); err != nil {
return err
}
if err := tx.Migrator().DropTable(newStudentClubCollection{}); err != nil {
return err
}
if err := tx.Migrator().AutoMigrate(InitialStudentClubCollection{}); err != nil {
if err := tx.Migrator().DropTable(&newStudentClub{}, &newStudentClubCollection{}); err != nil {
return err
}
if err := tx.Migrator().AutoMigrate(InitialStudentClub{}); err != nil {
if err := tx.Migrator().AutoMigrate(&InitialStudentClubCollection{}, &InitialStudentClub{}); err != nil {
return err
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/stretchr/testify v1.9.0
github.com/testcontainers/testcontainers-go v0.33.0
golang.org/x/sync v0.8.0
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1
google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61
google.golang.org/grpc v1.67.0
google.golang.org/protobuf v1.34.3-0.20240906163944-03df6c145d96
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
Expand Down
4 changes: 2 additions & 2 deletions server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc=
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I=
google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 h1:pAjq8XSSzXoP9ya73v/w+9QEAAJNluLrpmMq5qFJQNY=
google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:O6rP0uBq4k0mdi/b4ZEMAZjkhYWhS815kCvaMha4VN8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw=
Expand Down

0 comments on commit 3c4141d

Please sign in to comment.