TP-49039 : Schema changes to remove rca_input_links from rca table (#289)
This commit is contained in:
@@ -2,7 +2,6 @@ CREATE TABLE IF NOT EXISTS rca (
|
||||
id SERIAL PRIMARY KEY,
|
||||
incident_id integer NOT NULL REFERENCES incident(id),
|
||||
rca_link text,
|
||||
rca_input_links text[],
|
||||
status text NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
|
||||
@@ -5,13 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type RcaEntity struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
IncidentID uint `gorm:"index"`
|
||||
RcaLink string `gorm:"type:text"`
|
||||
RcaInputLinks []string `gorm:"type:text[]"`
|
||||
Status string `gorm:"type:text"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
ID uint `gorm:"primaryKey"`
|
||||
IncidentID uint `gorm:"index"`
|
||||
RcaLink string `gorm:"type:text"`
|
||||
Status string `gorm:"type:text"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
}
|
||||
|
||||
func (RcaEntity) TableName() string {
|
||||
|
||||
@@ -219,11 +219,10 @@ func GetMockIncident() *incident.IncidentEntity {
|
||||
|
||||
func getMockRCA() *rca.RcaEntity {
|
||||
return &rca.RcaEntity{
|
||||
ID: 1,
|
||||
IncidentID: 1,
|
||||
RcaLink: "",
|
||||
RcaInputLinks: nil,
|
||||
CreatedAt: time.Time{},
|
||||
UpdatedAt: time.Time{},
|
||||
ID: 1,
|
||||
IncidentID: 1,
|
||||
RcaLink: "",
|
||||
CreatedAt: time.Time{},
|
||||
UpdatedAt: time.Time{},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user