Quellcode durchsuchen

fix(go): use correct primary key gorm tag;

Vishal Dalwadi vor 7 Monaten
Ursprung
Commit
a86fad4e87
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 1 1
      schema/jobs.go
  2. 1 1
      schema/networks.go

+ 1 - 1
schema/jobs.go

@@ -16,7 +16,7 @@ import (
 // that it is easier to prevent a task from
 // being executed again.
 type Job struct {
-	ID        string    `gorm:"id;primary_key"`
+	ID        string    `gorm:"id;primaryKey"`
 	CreatedAt time.Time `gorm:"created_at"`
 }
 

+ 1 - 1
schema/networks.go

@@ -6,7 +6,7 @@ import (
 )
 
 type Network struct {
-	ID                  string   `gorm:"id;primary_key"`
+	ID                  string   `gorm:"id;primaryKey"`
 	IsIPv4              string   `gorm:"is_ipv4;default:'yes'"`
 	IsIPv6              string   `gorm:"is_ipv6;default:'no'"`
 	AddressRange        string   `gorm:"address_range"`