Skip to content

Commit

Permalink
Update the executions model (#5)
Browse files Browse the repository at this point in the history
* Update the executions model to add cluster column
  • Loading branch information
anandswaminathan authored Sep 28, 2019
1 parent 9e915d2 commit cb3201b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/repositories/config/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,14 @@ var Migrations = []*gormigrate.Migration{
return tx.Exec("update node_executions set parent_task_execution_id = NULL where parent_task_execution_id = 0").Error
},
},
// Update executions table to add cluster
{
ID: "2019-09-27-executions",
Migrate: func(tx *gorm.DB) error {
return tx.AutoMigrate(&models.Execution{}).Error
},
Rollback: func(tx *gorm.DB) error {
return return tx.Exec("ALTER TABLE executions DROP COLUMN IF EXISTS cluster").Error
},
},
}

0 comments on commit cb3201b

Please sign in to comment.