diff options
Diffstat (limited to 'src/server/Model/Database.hs')
-rw-r--r-- | src/server/Model/Database.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/Model/Database.hs b/src/server/Model/Database.hs index 7f1777a..8715ca1 100644 --- a/src/server/Model/Database.hs +++ b/src/server/Model/Database.hs @@ -27,12 +27,14 @@ User email Text name Text EmailKey email + UniqName name deriving Show Payment userId UserId creation UTCTime name Text cost Int + deletedAt UTCTime Maybe deriving Show SignIn token Text @@ -51,5 +53,5 @@ runDb = runNoLoggingT . runResourceT . withSqliteConn "database" . runSqlConn runMigrations :: IO () runMigrations = runDb $ runMigration migrateAll -textToKey :: (ToBackendKey SqlBackend a) => String -> Key a -textToKey text = toSqlKey (read text :: Int64) +textToKey :: (ToBackendKey SqlBackend a) => Text -> Key a +textToKey text = toSqlKey (read (unpack text) :: Int64) |