Skip to content

Commit

Permalink
Merge pull request #680 from SusanDoggie/patch-1
Browse files Browse the repository at this point in the history
Add unique index to SessionRecord key
  • Loading branch information
tanner0101 authored May 1, 2020
2 parents a5916ec + 0cd4fd6 commit dba22d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Fluent/Fluent+Sessions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public final class SessionRecord: Model {
.id()
.field("key", .string, .required)
.field("data", .json, .required)
.unique(on: "key")
.create()
}

Expand Down

0 comments on commit dba22d5

Please sign in to comment.