Skip to content

Commit

Permalink
feat: spec on playbook runs
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Sep 22, 2024
1 parent 6715f67 commit 9848b00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions models/playbooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ type PlaybookRun struct {
ID uuid.UUID `json:"id" gorm:"default:generate_ulid()"`
PlaybookID uuid.UUID `json:"playbook_id"`
Status PlaybookRunStatus `json:"status,omitempty"`
Spec types.JSON `json:"spec"`
CreatedAt time.Time `json:"created_at,omitempty" time_format:"postgres_timestamp" gorm:"<-:false"`
StartTime *time.Time `json:"start_time,omitempty" time_format:"postgres_timestamp"`
ScheduledTime time.Time `json:"scheduled_time,omitempty" time_format:"postgres_timestamp" gorm:"default:NOW(), NOT NULL"`
Expand Down
5 changes: 5 additions & 0 deletions schema/playbooks.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ table "playbook_runs" {
null = false
type = uuid
}
column "spec" {
null = false
type = jsonb
default = "{}" # temporary default value to make the migration possible. we can remove this later.
}
column "status" {
null = false
type = text
Expand Down

0 comments on commit 9848b00

Please sign in to comment.