]> source.dussan.org Git - gitea.git/commitdiff
fix unique
authorMartin Garton <martin.garton@ft.com>
Wed, 2 Apr 2014 19:35:29 +0000 (20:35 +0100)
committerMartin Garton <martin.garton@ft.com>
Wed, 2 Apr 2014 19:35:29 +0000 (20:35 +0100)
models/publickey.go

index 3f2fcabd3b45028fa2e8b696df9d88f5c812c978..ed47ff209d0bb2acd203f1ccddeff7e5cef8ac9d 100644 (file)
@@ -77,8 +77,8 @@ func init() {
 // PublicKey represents a SSH key of user.
 type PublicKey struct {
        Id          int64
-       OwnerId     int64  `xorm:"index"`
-       Name        string `xorm:"unique not null"`
+       OwnerId     int64  `xorm:"unique(s) index not null"`
+       Name        string `xorm:"unique(s) not null"`
        Fingerprint string
        Content     string    `xorm:"TEXT not null"`
        Created     time.Time `xorm:"created"`