We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bdd798 commit cca2168Copy full SHA for cca2168
share/model.go
@@ -42,6 +42,7 @@ type ProtoShare struct {
42
Permissions uint8
43
Orphan bool
44
Expiration datatypes.NullTime
45
+ PreviousID uint `gorm:"uniqueIndex"`
46
}
47
48
type Share struct {
@@ -65,10 +66,10 @@ type PublicLink struct {
65
66
67
type ShareState struct {
68
gorm.Model
- ShareID uint `gorm:"foreignKey:ShareID;references:ID"` // Define the foreign key field
69
+ ShareID uint `gorm:"foreignKey:ShareID;references:ID;uniqueIndex:compositeindex"` // Define the foreign key field
70
Share Share // Define the association
71
// Can not be uid because of lw accs
- User string
72
+ User string `gorm:"uniqueIndex:compositeindex"`
73
Synced bool
74
Hidden bool
75
Alias string
0 commit comments