File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ type ProjectModel struct {
11
11
gorm.Model
12
12
Name string `gorm:"index:unique_project,unique"`
13
13
SourceID uint
14
- Source * SourceModel `gorm:"foreignKey:ID;references:SourceID"`
14
+ Source * SourceModel
15
15
OrganizationID uint
16
- Organization * OrganizationModel `gorm:"foreignKey:ID;references:OrganizationID"`
16
+ Organization * OrganizationModel
17
17
Path string
18
18
Description string
19
19
Labels MultiString
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
12
12
type ResourceModel struct {
13
13
gorm.Model
14
14
StackID uint
15
- Stack * StackModel `gorm:"foreignKey:ID;references:StackID"`
15
+ Stack * StackModel
16
16
ResourceType string
17
17
ResourcePlane string
18
18
ResourceName string
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type RunModel struct {
15
15
// StackID is the stack ID of the run.
16
16
StackID uint
17
17
// Stack is the stack of the run.
18
- Stack * StackModel `gorm:"foreignKey:ID;references:StackID"`
18
+ Stack * StackModel
19
19
// Workspace is the target workspace of the run.
20
20
Workspace string
21
21
// Status is the status of the run.
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ type WorkspaceModel struct {
14
14
Labels MultiString
15
15
Owners MultiString
16
16
BackendID uint
17
- Backend * BackendModel `gorm:"foreignKey:ID;references:BackendID"`
17
+ Backend * BackendModel
18
18
}
19
19
20
20
// The TableName method returns the name of the database table that the struct is mapped to.
You can’t perform that action at this time.
0 commit comments