Skip to content

Commit

Permalink
Update migrations.go
Browse files Browse the repository at this point in the history
updated to handle existing PorncornVR scenes (up to 01/11/2024)
  • Loading branch information
theRealKLH committed Jan 14, 2024
1 parent 848a81c commit eff26c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1844,14 +1844,14 @@ func Migrate() {
ID: "0073-reset-RealJamVR-scenes-with-duped-actors",
Migrate: func(tx *gorm.DB) error {

rj := [...]string{"realjam-vr-39859", "realjam-vr-39861", "realjam-vr-40044", "realjam-vr-40064"}
rjn := [...]string{"realjam-vr-39859", "realjam-vr-39861", "realjam-vr-40044", "realjam-vr-40064", "porncorn-vr-39827", "porncorn-vr-39902", "porncorn-vr-40031", "porncorn-vr-39903"}
var scenes []models.Scene
err := tx.Where("site = ?", "RealJam VR").Find(&scenes).Error
err := tx.Where("studio = ?", "Real Jam Network").Find(&scenes).Error
if err != nil {
return err
}
for _, scene := range scenes {
for _, v := range rj {
for _, v := range rjn {
if scene.SceneID == v {
scene.NeedsUpdate = true
err = tx.Save(&scene).Error
Expand Down

0 comments on commit eff26c6

Please sign in to comment.