diff --git a/nomad/schema.go b/nomad/schema.go index 3ffda5c87..9db6dee25 100644 --- a/nomad/schema.go +++ b/nomad/schema.go @@ -181,7 +181,7 @@ func allocTableSchema() *memdb.TableSchema { Indexes: map[string]*memdb.IndexSchema{ // Primary index is a UUID "id": &memdb.IndexSchema{ - Name: "ID", + Name: "id", AllowMissing: false, Unique: true, Indexer: &memdb.UUIDFieldIndex{ diff --git a/nomad/schema_test.go b/nomad/schema_test.go new file mode 100644 index 000000000..79fcab693 --- /dev/null +++ b/nomad/schema_test.go @@ -0,0 +1,15 @@ +package nomad + +import ( + "testing" + + "github.com/hashicorp/go-memdb" +) + +func TestStateStoreSchema(t *testing.T) { + schema := stateStoreSchema() + _, err := memdb.NewMemDB(schema) + if err != nil { + t.Fatalf("err: %v", err) + } +}